Use symbolic constant for DST shift

No real changes, just use DST_OFFSET constant instead of 3600 and remove the
"FIXME" comments as we're not actually going to fix anything here but will
just continue to assume 1 hour shift for DST.
This commit is contained in:
Vadim Zeitlin
2017-04-18 19:47:15 +02:00
parent f6d9d7962e
commit 9c35db85d1
3 changed files with 12 additions and 8 deletions

View File

@@ -2066,8 +2066,7 @@ wxDateTime& wxDateTime::MakeTimezone(const TimeZone& tz, bool noDST)
// specified.
if ( !noDST && (IsDST() == 1) )
{
// FIXME we assume that the DST is always shifted by 1 hour
secDiff -= 3600;
secDiff -= DST_OFFSET;
}
return Add(wxTimeSpan::Seconds(secDiff));
@@ -2080,8 +2079,7 @@ wxDateTime& wxDateTime::MakeFromTimezone(const TimeZone& tz, bool noDST)
// See comment in MakeTimezone() above, the logic here is exactly the same.
if ( !noDST && (IsDST() == 1) )
{
// FIXME we assume that the DST is always shifted by 1 hour
secDiff -= 3600;
secDiff -= DST_OFFSET;
}
return Subtract(wxTimeSpan::Seconds(secDiff));