Fix invalid TimestampFormat being generated by custom/old date setting

New Behaviors:
If you have a custom date setting, your TimestampFormat will not be set
(you'll need to set it yourself).
If you have a custom time setting and not a custom date setting, your
TimestampFormat will end with your ShortTimeFormat.
This commit is contained in:
Liru Færs
2019-09-07 12:26:09 -04:00
parent f2d1c820f5
commit 46f57756e7

View File

@@ -140,15 +140,19 @@ void setTimeDateFormats(const S8& tempTimeFormat, const S8& tempDateFormat)
{
short_time = "%R";
long_time = "%T";
timestamp += " %T";
if (!timestamp.empty()) timestamp += " %T";
}
else
{
short_time = "%I:%M %p";
long_time = "%I:%M:%S %p";
timestamp += " %I:%M %p";
if (!timestamp.empty()) timestamp += " %I:%M %p";
}
}
else if (!timestamp.empty())
{
timestamp += ' ' + gSavedSettings.getString("ShortTimeFormat");
}
if (!short_date.empty())
{