[Interest] Relashionship between time_t and QDateTime

Constantin Makshin cmakshin at gmail.com
Wed Aug 28 10:28:01 CEST 2013

I looked at the MSVC 2012 runtime library sources and it appears that
localtime() is not as bad as I thought. It applies the DST offset if
daylight saving is found to be active. It also tries some dark magic to
calculate historical DST transitions (I'm not sure I'm allowed to post
fragments of this code, so people with MSVC can take a look themselves --
the most important/interesting files in this case are "localtim.c" and

So it looks like this problem has to be solved by running the application
under debugger and stepping through Qt code to see what every function,
system or not, returns.
On Aug 28, 2013 9:40 AM, "Thiago Macieira" <thiago.macieira at intel.com>

> On quarta-feira, 28 de agosto de 2013 09:20:30, Constantin Makshin wrote:
> > Damn, I just realized that I won't be able to test MSVC's localtime()
> > because Russia isn't using DST transitions since 2011, making it
> impossible
> > to distinguish "DST is not used for past years" from "localtime()
> > completely ignores daylight saving information".
> Well, you can at least check whether historical rules are applied. If the
> historical rules are applied, we're reasonably sure that this year's rules
> are
> applied.
> You can also change your timezone settings, can't you? :-)
> --
> Thiago Macieira - thiago.macieira (AT) intel.com
>   Software Architect - Intel Open Source Technology Center
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20130828/f9b163ee/attachment.html>

More information about the Interest mailing list