On Sun, Dec 13, 2015 at 5:00 PM, James K. Lowden <jklowden at schemamania.org>
wrote:

> On Thu, 10 Dec 2015 06:34:44 -0700
> "Keith Medcalf" <kmedcalf at dessus.com> wrote:
>
> > The only way to convert datetime data on windows is to use a
> > third-party package that does it properly, or write it yourself.
> > Using the WinAPI functions is equivalent to "writing it yourself"
> > because they do not actually do anything -- you have to manage all
> > the meaningful data and deal with the vagaries of the
> > under-documented closed proprietary function implementations in
> > windows (which Microsoft even admits do not work properly).
>
> Keith, your answer was so disheartening that I was impelled to revisit
> where the C standard is on time zones.  I remembered it was messy, but
> thought it had surely been fixed.
>
> It's not fixed, although gacial progress is being made.  Even though
> we've had the TZ database & Posix datetime functions since 1986, 30
> years later we're still struggling with it, and not only on Windows.
>

The problem would be that SQLite could not depend on the presence of TZ
functions even if they were added to the standard:

1. SQLite generally avoids non ANSI C so as to be compatible with the
largest possible number of platforms. ANSI C (aka C89 or C90 for the ISO
version) will never be updated to add new requirements.

2. Let's say that that the next version of the C standard does add TZ
functionality. That functionality would almost certainly only be required
for hosted implementations. Freestanding implementations have a much
smaller set of requirements (they don't even require the *current* time
functions!), and are the types of implementations used in targeting all
these embedded devices that make SQLite (likely) the most deployed software
in the world.

-- 
Scott Robison

Reply via email to