Hi all,

this is a reply to the following post:

http://archives.postgresql.org/message-id/7867.1219793...@sss.pgh.pa.us

which is also a TODO item:

[E] Incomplete itemRevise the src/timezone/tznames abbreviation files:

    * to add missing abbreviations
    * to find abbreviations that can be safely promoted to the Default list
    * BUG #4377: casting result of timeofday() to timestamp fails in
some timezones


Second question first:

- Which abbreviations could we move to the Default file?

I have created the Default file to more or less "simulate" the
behavior of the previously hard-coded time zone abbreviations. I did
not try to list there as many time zone definitions as possible. We
have a subset that obviously 99,9% are happy with. Adding more time
zones would satisfy less than the remaining 0,1%. One reason for
creating those files was that now everybody has the freedom to add,
remove or change time zone abbreviations, so I don't see a good reason
for generally blowing up the Default file... Adding single time zone
abbreviations on request however looks fine to me.


First question second:

- Why was IDT not among the timezone definitions?

When I did the initial patch for the timezone files I have been
exporting the contents of the zic database. Since the zic database
also lists many time zone abbreviations that are no longer in use, I
tried to find out which ones are current and which ones are not. It
seems that there have been a few special cases that I missed (see
below), two of those IDT and IST. Furthermore IDT was not among the
hard coded time zone abbreviations that we previously used either. IST
was, so at that time I have manually added IST to the Default file and
have added the comment "not in zic" (which now turns out to be wrong).

Other time zone abbreviations that I missed previously and now checked:

WET 0 Africa/Casablanca - ok
IST 7200 Asia/Jerusalem - ok
WST 28800 Australia/Perth - ok
AMT -14400 America/Campo_Grande - ok
AMT -14400 America/Cuiaba - ok
BRT -10800 America/Sao_Paulo - ok
WEST 3600 Africa/Casablanca - missing - inserted in Africa.txt, edited
Europe.txt (not in Default)
IDT 10800 Asia/Jerusalem - missing - inserted in Asia.txt and to
Default (because IST is in Default)
IRDT 16200 Asia/Tehran - missing - added to Asia.txt (not to Default)
IRST 12600 Asia/Tehran - missing - added to Asia.txt (not to Default)
CWST 31500 Australia/Eucla - missing - added to Australia.txt (not to Default)


So in my opinion the TODO item is done, I have checked why IDT was
missing and I have checked similar cases. I would not move more time
zone definitions to the Default file. If anybody wants to, what are
the reasons?


Best regards,
Joachim
diff -cr cvs/src/timezone/tznames/Africa.txt cvs.build/src/timezone/tznames/Africa.txt
*** cvs/src/timezone/tznames/Africa.txt	2006-07-25 15:49:21.000000000 +0200
--- cvs.build/src/timezone/tznames/Africa.txt	2009-05-10 22:44:10.000000000 +0200
***************
*** 161,166 ****
--- 161,172 ----
                   #     (Africa/Niamey)
                   #     (Africa/Porto-Novo)
                   #     (Africa/Windhoek)
+ WEST     3600 D  # Western Europe Summer Time
+                  #     (Africa/Casablanca)
+                  #     (Atlantic/Canary)
+                  #     (Atlantic/Faeroe)
+                  #     (Atlantic/Madeira)
+                  #     (Europe/Lisbon)
  WET         0    # Western Europe Time
                   #     (Africa/Casablanca)
                   #     (Africa/El_Aaiun)
diff -cr cvs/src/timezone/tznames/Asia.txt cvs.build/src/timezone/tznames/Asia.txt
*** cvs/src/timezone/tznames/Asia.txt	2006-12-15 17:54:43.000000000 +0100
--- cvs.build/src/timezone/tznames/Asia.txt	2009-05-10 23:07:44.000000000 +0200
***************
*** 138,147 ****
--- 138,152 ----
                   #     (Asia/Phnom_Penh)
                   #     (Asia/Saigon)
                   #     (Asia/Vientiane)
+ IDT     10800 D  # Israel Daylight Time
+ IRDT    16200 D  # Iran Daylight Time
+                  #     (Asia/Tehran)
  IRKST   32400 D  # Irkutsk Summer Time
                   #     (Asia/Irkutsk)
  IRKT    28800    # Irkutsk Time
                   #     (Asia/Irkutsk)
+ IRST    12600    # Iran Standard Time
+                  #     (Asia/Tehran)
  IRT     12600    # Iran Time (not in zic)
  # CONFLICT! IST is not unique
  # Other timezones:
***************
*** 154,160 ****
  # - IST: Irish Summer Time (Europe)
  # - IST: Indian Standard Time (Asia)
  IST      7200    # Israel Standard Time
-                  #     (this time zone is not contained in the ZIC database)
  JAYT    32400    # Jayapura Time (Indonesia) (not in zic)
  JST     32400    # Japan Standard Time
                   #     (Asia/Tokyo)
--- 159,164 ----
diff -cr cvs/src/timezone/tznames/Australia.txt cvs.build/src/timezone/tznames/Australia.txt
*** cvs/src/timezone/tznames/Australia.txt	2006-07-25 15:49:21.000000000 +0200
--- cvs.build/src/timezone/tznames/Australia.txt	2009-05-10 23:23:02.000000000 +0200
***************
*** 25,30 ****
--- 25,32 ----
  CST     34200    # Central Standard Time (Australia)
                   #     (Australia/Adelaide)
                   #     (Australia/Broken_Hill)
+ CWST    31500    # Central Western Standard Time (Australia)
+                  #     (Australia/Eucla)
  # CONFLICT! EAST is not unique
  # Other timezones:
  #  - EAST: Easter Island Time (Chile) (Pacific)
diff -cr cvs/src/timezone/tznames/Default cvs.build/src/timezone/tznames/Default
*** cvs/src/timezone/tznames/Default	2009-05-10 19:53:20.000000000 +0200
--- cvs.build/src/timezone/tznames/Default	2009-05-10 22:58:29.000000000 +0200
***************
*** 283,288 ****
--- 283,289 ----
                   #     (Asia/Phnom_Penh)
                   #     (Asia/Saigon)
                   #     (Asia/Vientiane)
+ IDT     10800 D  # Israel Daylight Time
  IRKST   32400 D  # Irkutsk Summer Time
                   #     (Asia/Irkutsk)
  IRKT    28800    # Irkutsk Time
diff -cr cvs/src/timezone/tznames/Europe.txt cvs.build/src/timezone/tznames/Europe.txt
*** cvs/src/timezone/tznames/Europe.txt	2006-07-25 15:49:21.000000000 +0200
--- cvs.build/src/timezone/tznames/Europe.txt	2009-05-10 22:43:59.000000000 +0200
***************
*** 191,196 ****
--- 191,197 ----
  SAMT    14400    # Samara Time
                   #     (Europe/Samara)
  WEST     3600 D  # Western Europe Summer Time
+                  #     (Africa/Casablanca)
                   #     (Atlantic/Canary)
                   #     (Atlantic/Faeroe)
                   #     (Atlantic/Madeira)
diff -cr cvs/src/timezone/tznames/README cvs.build/src/timezone/tznames/README
*** cvs/src/timezone/tznames/README	2008-07-08 10:29:32.000000000 +0200
--- cvs.build/src/timezone/tznames/README	2009-05-10 23:30:24.000000000 +0200
***************
*** 23,27 ****
  For the time being you can always add your own set.
  
  The files named Africa.txt, etc, are not intended to be used directly as
! timezone abbreviation files.  They contain reference definitions of timezone
  names that can be copied into a custom abbreviation file as needed.
--- 23,36 ----
  For the time being you can always add your own set.
  
  The files named Africa.txt, etc, are not intended to be used directly as
! time zone abbreviation files. They contain reference definitions of time zone
  names that can be copied into a custom abbreviation file as needed.
+ 
+ Not that these files (*.txt) are already a subset of the zic timezone database
+ files: we tried to list only those time zones that (according to zic timezone
+ database) appear to be still in use.
+ 
+ Also we do not try to list as many time zones as possible in the `Default'
+ file. Initially the `Default' file was created with the time zones that had
+ been hard coded in the PostgreSQL source code previously.
+ 
-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to