Switch over to using the src/timezone functions for formatting timestamps
authorTom Lane <tgl@sss.pgh.pa.us>
Sat, 4 Aug 2007 01:26:54 +0000 (01:26 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Sat, 4 Aug 2007 01:26:54 +0000 (01:26 +0000)
commit47f5001efe0983eb2ce9d7cdde3f5179dea40ae4
tree205d08008e417a2add70576d9923bf363a7882b4
parenta3bb438c25b49ab8169167cd7d6e45279dc6f9dd
Switch over to using the src/timezone functions for formatting timestamps
displayed in the postmaster log.  This avoids Windows-specific problems with
localized time zone names that are in the wrong encoding, and generally seems
like a good idea to forestall other potential platform-dependent issues.
To preserve the existing behavior that all backends will log in the same time
zone, create a new GUC variable log_timezone that can only be changed on a
system-wide basis, and reference log-related calculations to that zone instead
of the TimeZone variable.

This fixes the issue reported by Hiroshi Saito that timestamps printed by
xlog.c startup could be improperly localized on Windows.  We still need a
simpler patch for that problem in the back branches, however.
16 files changed:
doc/src/sgml/config.sgml
doc/src/sgml/datatype.sgml
src/backend/access/transam/xlog.c
src/backend/commands/variable.c
src/backend/postmaster/syslogger.c
src/backend/utils/adt/date.c
src/backend/utils/adt/datetime.c
src/backend/utils/adt/formatting.c
src/backend/utils/adt/nabstime.c
src/backend/utils/adt/timestamp.c
src/backend/utils/error/elog.c
src/backend/utils/misc/guc.c
src/backend/utils/misc/postgresql.conf.sample
src/include/commands/variable.h
src/include/pgtime.h
src/timezone/pgtz.c