Skip site navigation (1) Skip section navigation (2)

Pre-1970 dates under Win32

From: Claudio Natoli <claudio(dot)natoli(at)memetrics(dot)com>
To: "'pgsql-hackers-win32(at)postgresql(dot)org'" <pgsql-hackers-win32(at)postgresql(dot)org>
Cc: "'pgsql-hackers(at)postgresql(dot)org'" <pgsql-hackers(at)postgresql(dot)org>
Subject: Pre-1970 dates under Win32
Date: 2004-02-02 05:55:37
Message-ID: A02DEC4D1073D611BAE8525405FCCE2B55F2BA@harris.memetrics.local (view raw, whole thread or download thread mbox)
Lists: pgsql-hackerspgsql-hackers-win32
Under Win32, localtime returns NULL for dates pre 1970.

A number of places in the code fail to check from a NULL return from
localtime, with none seemingly more problematic than those calls within
DetermineLocalTimeZone, which causes SEGVs in a number of tests (which
clearly pass pre 1970 dates to this function).

If we want to support pre-1970 dates, which I imagine we do, then this
function requires some serious rework under Win32. If we don't, then I'm
guessing we can just drop in some error checking for a NULL return from
localtime (as I've done on my personal source base), and modify the tests
for Win32 accordingly.


Certain disclaimers and policies apply to all email sent from Memetrics.
For the full text of these disclaimers and policies see 


pgsql-hackers by date

Next:From: Tom LaneDate: 2004-02-02 06:57:15
Subject: Re: [HACKERS] Pre-1970 dates under Win32
Previous:From: Christopher Kings-LynneDate: 2004-02-02 04:53:30
Subject: Re: Idea about better configuration options for sort memory

pgsql-hackers-win32 by date

Next:From: Korea PostgreSQL Users' GroupDate: 2004-02-02 05:58:35
Subject: CVS source win32 mingw some comile error
Previous:From: Korea PostgreSQL Users' GroupDate: 2004-02-02 05:19:43
Subject: CVS source win32 mingw some comile error

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group