mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-22 14:15:38 +00:00
Merge pull request #621 from cmitu/date-fix
fix 'DateTimeEditComponent' output formatting
This commit is contained in:
commit
d1c24f429e
|
@ -199,6 +199,8 @@ std::string DateTimeEditComponent::getDisplayString(DisplayMode mode) const
|
|||
fmt = "%m/%d/%Y";
|
||||
break;
|
||||
case DISP_DATE_TIME:
|
||||
if(mTime.getTime() == 0)
|
||||
return "unknown";
|
||||
fmt = "%m/%d/%Y %H:%M:%S";
|
||||
break;
|
||||
case DISP_RELATIVE_TO_NOW:
|
||||
|
@ -226,9 +228,6 @@ std::string DateTimeEditComponent::getDisplayString(DisplayMode mode) const
|
|||
break;
|
||||
}
|
||||
|
||||
if(mTime.getTime() == 0)
|
||||
return "unknown";
|
||||
|
||||
return Utils::Time::timeToString(mTime, fmt);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue