[Development] QTimeScheme for Qt - 5.0 or 5.1?

Konrad Rosenbaum konrad at silmor.de
Fri Feb 17 07:06:16 CET 2012


On Wednesday 15 February 2012, Stephen Kelly wrote:
> On Wednesday, February 15, 2012 21:55:54 Konrad Rosenbaum wrote:
> >  The
> > 
> > calculation results are almost identical. Almost.
> 
> Is that enough?
> 
> John Layt mentioned the existence of such a mapping too.

It depends on how you define "enough". Both systems yield the same time for 
the richer countries (US, central Europe, Japan) as long as you stay within 
the limits of the last 30 years or so. Beyond that Olson tends to have more 
accurate data on time shifts. This means that the time returned by Windows 
and Olson DB can differ by one or two hours for dates further in the past 
and for some countries that are "less important" for Microsoft.

I'd actually recommend three engines:

a) the default engine is basically what we have in Qt4 - it just knows 
"local" and "UTC" - its backend uses the system functions

b) OlsonDB would be the first advanced engine

c) Windows could come later to have one that is identical to the default 
engine for the local zone on Windows

> > *it is not always clear which time spec is standard and which one is
> > DST
> 
> I'm not certain what you mean.

The definition of time zones is unfortunately up to politicians, so it does 
get fuzzy around the edges: while most countries either do not observe DST 
or have standard time in (local) summer and DST in winter, there are 
countries that have standard time in (local) winter and some kind of Anti-
DST in summer. At times countries do not switch off the time spec they 
happen to be on for several years (e.g. during World War II several 
countries remained on DST and called it War Time).

Over the years I found out that if you really want to confuse yourself, just 
try to find the specifics of any aspect of how mankind measures time. The 
scale does not matter - the confusion is fractal. ;-)



	Konrad
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.qt-project.org/pipermail/development/attachments/20120217/3b1d5fad/attachment.sig>


More information about the Development mailing list