OSDN Git Service

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)
commitbdd6b62245fe7b5f25c4fec509b80ec930b6deff
tree91af2ffde788fdd2855b0dfb1c18e2bbb5aa50a1
parent73852bd520c219051431a74ee511c4f29dd4baf3
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