[Development] QTimeScheme for Qt - 5.0 or 5.1?
Stephen Kelly
stephen.kelly at kdab.com
Fri Feb 17 12:56:38 CET 2012
On Friday, February 17, 2012 07:06:16 Konrad Rosenbaum wrote:
> 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".
My question was mostly rhetorical.
> 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
Yes, this is essentially what I proposed, except that I proposed only a) being
part of Qt, and b) and c) to be outsourced - made possible by implementing the
QTimeZone (nee QTimeScheme) abstract interface.
>
> > > *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).
Yes, but in the interface I proposed the output timezone depends on the input
datetime, so the result can be as good as Olson can represent, right?
Have you looked at my patch yet?
Thanks,
--
Stephen Kelly <stephen.kelly at kdab.com> | Software Engineer
KDAB (Deutschland) GmbH & Co.KG, a KDAB Group Company
www.kdab.com || Germany +49-30-521325470 || Sweden (HQ) +46-563-540090
KDAB - Qt Experts - Platform-Independent Software Solutions
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20120217/a3f6b00f/attachment.html>
-------------- 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/a3f6b00f/attachment.sig>
More information about the Development
mailing list