Use C++11 time format flags

This commit is contained in:
Lirusaito
2019-03-31 03:13:02 -04:00
parent c8a9efe5c8
commit 344dc90d56
2 changed files with 11 additions and 11 deletions

View File

@@ -7045,7 +7045,7 @@ This should be as low as possible, but too low may break functionality</string>
<key>Type</key>
<string>String</string>
<key>Value</key>
<string>%Y-%m-%d</string>
<string>%F</string>
</map>
<key>ShortTimeFormat</key>
<map>
@@ -7056,7 +7056,7 @@ This should be as low as possible, but too low may break functionality</string>
<key>Type</key>
<string>String</string>
<key>Value</key>
<string>%H:%M</string>
<string>%R</string>
</map>
<key>LongTimeFormat</key>
<map>
@@ -7067,7 +7067,7 @@ This should be as low as possible, but too low may break functionality</string>
<key>Type</key>
<string>String</string>
<key>Value</key>
<string>%H:%M:%S</string>
<string>%T</string>
</map>
<key>TimestampFormat</key>
<map>
@@ -7078,7 +7078,7 @@ This should be as low as possible, but too low may break functionality</string>
<key>Type</key>
<string>String</string>
<key>Value</key>
<string>%a %d %b %Y %H:%M:%S</string>
<string>%a %d %b %Y %T</string>
</map>
<key>SecondsInChatAndIMs</key>
<map>

View File

@@ -128,9 +128,9 @@ void LLPrefsAscentChat::onCommitTimeDate(LLUICtrl* ctrl)
if (tempTimeFormat == 0)
{
short_time = "%H:%M";
long_time = "%H:%M:%S";
timestamp = " %H:%M:%S";
short_time = "%R";
long_time = "%T";
timestamp = " %T";
}
else
{
@@ -141,7 +141,7 @@ void LLPrefsAscentChat::onCommitTimeDate(LLUICtrl* ctrl)
if (tempDateFormat == 0)
{
short_date = "%Y-%m-%d";
short_date = "%F";
long_date = "%A %d %B %Y";
timestamp = "%a %d %b %Y" + timestamp;
}
@@ -153,7 +153,7 @@ void LLPrefsAscentChat::onCommitTimeDate(LLUICtrl* ctrl)
}
else
{
short_date = "%m/%d/%Y";
short_date = "%D";
long_date = "%A, %B %d %Y";
timestamp = "%a %b %d %Y" + timestamp;
}
@@ -218,11 +218,11 @@ void LLPrefsAscentChat::refreshValues()
}
format = gSavedSettings.getString("ShortDateFormat");
if (format.find("%m/%d/%") != std::string::npos)
if (format.find("%D") != std::string::npos || format.find("%m/%d/%") != std::string::npos)
{
mDateFormat = 2;
}
else if (format.find("%d/%m/%") != -1)
else if (format.find("%d/%m/%") != std::string::npos)
{
mDateFormat = 1;
}