summaryrefslogtreecommitdiff
path: root/src/timezone
AgeCommit message (Collapse)Author
2004-09-01Add code to be able to match the timezone name on localized WindowsTom Lane
systems. Magnus Hagander.
2004-08-30Another pgindent run with lib typedefs added.Bruce Momjian
2004-08-29Pgindent run for 8.0.Bruce Momjian
2004-08-29Update copyright to 2004.Bruce Momjian
2004-08-11Fix function definition that somehow missed being ANSI-fied, and alignTom Lane
it with previous prototype to suppress complaints from picky compilers, per report from Scott Bailey. Also, remove substitute strerror definition --- not needed, since we link this with libpgport.
2004-08-08More Win32 zic build cleanups now that we have symlinks, it needs help.Bruce Momjian
2004-08-08Another zic cleanup .Bruce Momjian
2004-08-08Link in dirmod specially for zic so it works on Win32.Bruce Momjian
2004-07-31Still another try at matching system timezone nicely. On non-WindowsTom Lane
machines, break tie scores by preferring shorter zone names over longer; for names of equal length, prefer the alphabetically first name. This yields for example 'EST5EDT' not 'America/New_York' for US eastern time. On Windows, abandon the whole concept of inspecting the detailed behavior of the system TZ library, because it doesn't bear inspection :-(. Instead use a hardwired mapping table to select our zone name based on the result of strftime %Z output. Windows code from Magnus Hagander.
2004-07-30Must guard against NULL return from localtime() when probing pre-1970Tom Lane
dates. Per Magnus Hagander.
2004-07-22Still another try at automatically detecting the best match in the zicTom Lane
timezone database for the system behavior we find ourselves in. Scan backwards from current time and choose the zone that matches furthest back. As per discussion a week or so back.
2004-07-22Add missing <getopt.h>, per Dann Corbit.Tom Lane
2004-07-10Check more test points (in fact, every week in 1970..2004) to get a moreTom Lane
accurate matching of our time zone to the system's zone. This method is able to distinguish Antarctica/Casey from Australia/Perth, as in Chris K-L's recent example; and it is not materially slower than before, because the extra checks generally don't get done against very many time zones. It seems possible that with this test we'd be able to correctly identify Windows timezones without looking at the timezone name, but I do not have the ability to try it.
2004-06-03Adjust our timezone library to use pg_time_t (typedef'd as int64) inTom Lane
place of time_t, as per prior discussion. The behavior does not change on machines without a 64-bit-int type, but on machines with one, which is most, we are rid of the bizarre boundary behavior at the edges of the 32-bit-time_t range (1901 and 2038). The system will now treat times over the full supported timestamp range as being in your local time zone. It may seem a little bizarre to consider that times in 4000 BC are PST or EST, but this is surely at least as reasonable as propagating Gregorian calendar rules back that far. I did not modify the format of the zic timezone database files, which means that for the moment the system will not know about daylight-savings periods outside the range 1901-2038. Given the way the files are set up, it's not a simple decision like 'widen to 64 bits'; we have to actually think about the range of years that need to be supported. We should probably inquire what the plans of the upstream zic people are before making any decisions of our own.
2004-05-28Seems we forgot the installdirs target in this makefile.Tom Lane
2004-05-25Tweaks per discussion with Magnus: suppress chatter on unpatched MinGWTom Lane
systems, add verbose logging (at DEBUG4) to help identify why a given time zone is not matched.
2004-05-25Add code to identify_system_timezone() to try all zones in the zicTom Lane
database, not just ones that we cons up POSIX names for. This looks grim but it seems to take less than a second even on a relatively slow machine, and since it only happens once during postmaster startup, that seems acceptable.
2004-05-24Rewrite identify_system_timezone() to give it better-than-chance oddsTom Lane
of correctly identifying the system's daylight-savings transition rules. This still begs the question of how to look through the zic database to find a matching zone definition, but at least now we'll have some chance of recognizing the match when we find it.
2004-05-23Seems we had the wrong sign convention for the default Etc/GMTx zoneTom Lane
names. Per report from Alvaro.
2004-05-23Use case-insensitive comparison so that explicitly setting timezone=unknownTom Lane
in postgresql.conf does the right thing. variable.c got this right, but not pgtz.c ...
2004-05-22Fix to install correctly in vpath build case.Tom Lane
2004-05-21pgindent did a pretty awful job on the timezone code, particularly withTom Lane
respect to doubly-starred comment blocks. Do some manual cleanup.
2004-05-21Pgindent timezone file, per request from Tom.Bruce Momjian
2004-05-21Integrate src/timezone library for all platforms. There is more we canTom Lane
and should do now that we control our own destiny for timezone handling, but this commit gets the bulk of the picayune diffs in place. Magnus Hagander and Tom Lane.
2004-05-19Allow zic to compile by defining a "" value for my_exec_path. It isn'tBruce Momjian
used by zic anyway.
2004-05-18Update Makefile dependencies for Win32 timezones, per Claudio.Bruce Momjian
2004-05-18Clean up some relative path install issues with Claudio's help.Bruce Momjian
2004-05-17Reorganize code to allow path-relative installs.Bruce Momjian
Create new get_* functions to access compiled-in paths and adjust if relative installs are to be used. Clean up substitute_libpath_macro() code.
2004-05-02More win32 adjustment for timezone directory.Bruce Momjian
2004-05-01Fix timezone data path for Unix and win32.Bruce Momjian
2004-05-01Remove debug output line.Bruce Momjian
2004-05-01Rename function to be less win32 specific.Bruce Momjian
2004-04-30Fix zic compiler to use pg version.Bruce Momjian
Move timezone database to share/timezone.
2004-04-30Allow build of timezone database on unix.Bruce Momjian
2004-04-30More timezone build adjustments.Bruce Momjian
2004-04-30Timezone code checks for HAVE_SYMLINK of zero, so use in pgtz.h:Bruce Momjian
#ifndef HAVE_SYMLINK #define HAVE_SYMLINK 0 #endif
2004-04-30More cleanups for USE_PGTZ.Bruce Momjian
2004-04-30Allow timezone to compile under Unix by blocking 'timezone' conflict withBruce Momjian
system headers. Allow system to find timezone database by pasing pkglibdir into the binary via a define.
2004-04-30Convert DOS newlines to Unix newlines.Bruce Momjian
2004-04-30Integrate timezone library to be called only from Win32.Bruce Momjian
Timezone code backend integration done by Magnus Hagander.
2004-04-30Minor adjustments to enable public-domain timezone library to be calledBruce Momjian
from our code.
2004-04-30Timezone library changes to map into our backend code.Bruce Momjian
2004-04-30Add Olson's public domain timezone library to src/timezone.Bruce Momjian