mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-26 16:15:39 +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";
|
fmt = "%m/%d/%Y";
|
||||||
break;
|
break;
|
||||||
case DISP_DATE_TIME:
|
case DISP_DATE_TIME:
|
||||||
|
if(mTime.getTime() == 0)
|
||||||
|
return "unknown";
|
||||||
fmt = "%m/%d/%Y %H:%M:%S";
|
fmt = "%m/%d/%Y %H:%M:%S";
|
||||||
break;
|
break;
|
||||||
case DISP_RELATIVE_TO_NOW:
|
case DISP_RELATIVE_TO_NOW:
|
||||||
|
@ -226,9 +228,6 @@ std::string DateTimeEditComponent::getDisplayString(DisplayMode mode) const
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(mTime.getTime() == 0)
|
|
||||||
return "unknown";
|
|
||||||
|
|
||||||
return Utils::Time::timeToString(mTime, fmt);
|
return Utils::Time::timeToString(mTime, fmt);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue