2021-08-03 Fred Gleason <fredg@paravelsystems.com>

* Added 'SYSTEM.LONG_DATE_FORMAT', 'SYSTEM.SHORT_DATE_FORMAT'
	and 'SYSTEM.TIME_FORMAT' fields to the database.
	* Incremented the database version to 351.
	* Added 'RDSystem::longDateFormat()', 'RDSystem'setLongDateFormat()',
	'RDSystem::shortDateFormat()', 'RDSystem::setShortDateFormat()',
	'RDSystem::timeFormat()' and 'RDSystem::setTimeFormat()' methods.
	* Added a 'Date/Time Formats' section to the 'System-Wide Settings'
	dialog in rdadmin(1).

Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
Fred Gleason
2021-08-03 20:44:58 -04:00
parent f48fb2ef5c
commit 15ff31483d
15 changed files with 373 additions and 14 deletions

View File

@@ -205,6 +205,42 @@ void RDSystem::setRssProcessorStation(const QString &str) const
}
QString RDSystem::longDateFormat() const
{
return GetValue("LONG_DATE_FORMAT").toString();
}
void RDSystem::setLongDateFormat(const QString &str)
{
SetRow("LONG_DATE_FORMAT",str);
}
QString RDSystem::shortDateFormat() const
{
return GetValue("SHORT_DATE_FORMAT").toString();
}
void RDSystem::setShortDateFormat(const QString &str)
{
SetRow("SHORT_DATE_FORMAT",str);
}
QString RDSystem::timeFormat() const
{
return GetValue("TIME_FORMAT").toString();
}
void RDSystem::setTimeFormat(const QString &str)
{
SetRow("TIME_FORMAT",str);
}
QString RDSystem::xml() const
{
QString xml="<systemSettings>\n";
@@ -214,6 +250,9 @@ QString RDSystem::xml() const
xml+=RDXmlField("maxPostLength",maxPostLength());
xml+=RDXmlField("isciXreferencePath",isciXreferencePath());
xml+=RDXmlField("tempCartGroup",tempCartGroup());
xml+=RDXmlField("longDateFormat",longDateFormat());
xml+=RDXmlField("shortDateFormat",shortDateFormat());
xml+=RDXmlField("timeFormat",timeFormat());
xml+="</systemSettings>\n";
return xml;