and now timezones work even better ;-)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4897 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
1999-12-10 20:59:08 +00:00
parent 299fcbfe98
commit 151d66be0f
2 changed files with 3 additions and 10 deletions

View File

@@ -688,6 +688,7 @@ wxDateTime::Tm wxDateTime::GetTm(const TimeZone& tz) const
}
else
{
time += tz.GetOffset();
tm = gmtime(&time);
}
@@ -701,7 +702,7 @@ wxDateTime::Tm wxDateTime::GetTm(const TimeZone& tz) const
// remember the time and do the calculations with the date only - this
// eliminates rounding errors of the floating point arithmetics
wxLongLong timeMidnight = m_time - GetTimeZone() * 1000;
wxLongLong timeMidnight = m_time + tz.GetOffset() * 1000;
long timeOnly = (timeMidnight % MILLISECONDS_PER_DAY).ToLong();