Adjust our timezone library to use pg_time_t (typedef'd as int64) in
authorTom Lane <tgl@sss.pgh.pa.us>
Thu, 3 Jun 2004 02:08:07 +0000 (02:08 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Thu, 3 Jun 2004 02:08:07 +0000 (02:08 +0000)
commit921d749bd4c34c3349f1c254d5faa2f1cec03911
treec349959cb92495a8231020062fa46ac1c2b57afd
parent473ac70acae41c5f1fecbb0b57e9f5be5b26ab68
Adjust our timezone library to use pg_time_t (typedef'd as int64) in
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.
28 files changed:
src/backend/access/transam/xact.c
src/backend/access/transam/xlog.c
src/backend/bootstrap/bootparse.y
src/backend/bootstrap/bootscanner.l
src/backend/bootstrap/bootstrap.c
src/backend/optimizer/geqo/geqo_main.c
src/backend/postmaster/bgwriter.c
src/backend/postmaster/pgstat.c
src/backend/postmaster/postmaster.c
src/backend/storage/buffer/freelist.c
src/backend/tcop/postgres.c
src/backend/utils/adt/date.c
src/backend/utils/adt/datetime.c
src/backend/utils/adt/nabstime.c
src/backend/utils/adt/timestamp.c
src/backend/utils/error/elog.c
src/include/catalog/pg_control.h
src/include/commands/vacuum.h
src/include/pgtime.h
src/include/utils/datetime.h
src/include/utils/nabstime.h
src/test/regress/expected/horology.out
src/test/regress/expected/timestamp.out
src/test/regress/expected/timestamptz.out
src/timezone/localtime.c
src/timezone/pgtz.c
src/timezone/strftime.c
src/timezone/zic.c