diff --git a/doc/src/sgml/datetime.sgml b/doc/src/sgml/datetime.sgml index 2cfda15f097..f5af88f134d 100644 --- a/doc/src/sgml/datetime.sgml +++ b/doc/src/sgml/datetime.sgml @@ -1,5 +1,5 @@ @@ -2230,24 +2230,33 @@ $PostgreSQL: pgsql/doc/src/sgml/datetime.sgml,v 2.47 2005/09/09 02:31:48 tgl Exp In addition to the names listed in the table, - PostgreSQL will accept time zone names of the - form STDoffset or + PostgreSQL will accept POSIX-style time zone + specifications of the form STDoffset or STDoffsetDST, where STD is a zone abbreviation, offset is a numeric offset in hours west from UTC, and DST is an - optional daylight-savings zone abbreviation, assumed to stand for one hour - ahead of the given offset. For example, if EST5EDT were not - already a recognized zone name, it would be accepted and would be - functionally equivalent to USA East Coast time. When a daylight-savings - zone name is present, it is assumed to be used according to USA time zone - rules, so this feature is of limited use outside North America. - One should also be wary that this provision can lead to - silently accepting bogus input, since there is no check on the - reasonableness of the zone abbreviations. For example, - SET TIMEZONE TO FOOBAR0 will work, leaving the system - effectively using a rather peculiar abbreviation for GMT. + optional daylight-savings zone abbreviation, assumed to stand for one + hour ahead of the given offset. For example, if EST5EDT + were not already a recognized zone name, it would be accepted and would + be functionally equivalent to USA East Coast time. When a + daylight-savings zone name is present, it is assumed to be used + according to the same daylight-savings transition rules used in the + zic time zone database's posixrules entry. + In a standard PostgreSQL installation, + posixrules is the same as US/Eastern, so + that POSIX-style time zone specifications follow USA daylight-savings + rules. If needed, you can adjust this behavior by replacing the + posixrules file. + + One should be wary that the POSIX-style time zone feature can + lead to silently accepting bogus input, since there is no check on the + reasonableness of the zone abbreviations. For example, SET + TIMEZONE TO FOOBAR0 will work, leaving the system effectively using + a rather peculiar abbreviation for UTC. + + diff --git a/src/timezone/Makefile b/src/timezone/Makefile index a171035d8a8..2851558d300 100644 --- a/src/timezone/Makefile +++ b/src/timezone/Makefile @@ -4,7 +4,7 @@ # Makefile for the timezone library # IDENTIFICATION -# $PostgreSQL: pgsql/src/timezone/Makefile,v 1.22 2005/07/06 21:40:09 momjian Exp $ +# $PostgreSQL: pgsql/src/timezone/Makefile,v 1.22.2.1 2007/03/14 17:38:22 tgl Exp $ # #------------------------------------------------------------------------- @@ -25,6 +25,10 @@ TZDATA := africa antarctica asia australasia europe northamerica southamerica \ pacificnew etcetera factory backward systemv solar87 solar88 solar89 TZDATAFILES := $(TZDATA:%=$(srcdir)/data/%) +# which zone should determine the DST rules (not the specific UTC offset!) +# for POSIX-style timezone specs +POSIXRULES = US/Eastern + all: SUBSYS.o submake-libpgport zic SUBSYS.o: $(OBJS) @@ -34,7 +38,7 @@ zic: $(ZICOBJS) $(CC) $(CFLAGS) $(ZICOBJS) $(LDFLAGS) $(LIBS) -o $@$(X) install: all installdirs - ./zic -d $(DESTDIR)$(datadir)/timezone $(TZDATAFILES) + ./zic -d $(DESTDIR)$(datadir)/timezone -p $(POSIXRULES) $(TZDATAFILES) installdirs: $(mkinstalldirs) $(DESTDIR)$(datadir)