home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / std_unix / mod.std.unix.v5 / text0060.txt < prev    next >
Encoding:
Internet Message Format  |  1987-06-30  |  2.3 KB

  1. From: Jack Jansen <seismo!mcvax!jack>
  2. Date: 25 Feb 86 20:56:12 N (Tue)
  3. Organization: AMOEBA project, CWI, Amsterdam
  4.  
  5. Well, even though the discussion doesn't seem to have anything
  6. to do with standardising, it *is* interesting.
  7.  
  8. [ Comments on how to handle timezones are explicitly requested
  9. in an appendix of the current P1003 draft.  -mod ]
  10.  
  11. I like the outside of elsie!ado's proposal, but I think the
  12. implementation could be done more simple and cheap.
  13.  
  14. First (not too important), if you go for binary files, you
  15. shouldn't put two arrays of fixed size in the beginning.
  16. This will inevitably mean trouble for future generation. If you
  17. *do* insist on binary data, make it variable sized array, and
  18. put a count in.
  19.  
  20. Second, and most important, I think the method is far too complex
  21. for its achievements. I think something along the following
  22. lines would work as easy, and be much simpler to set up:
  23. - view normal time and dst as *different* timezones. If a certain
  24.   area has had more than one dst offset since written history(jan70),
  25.   see those as different too. Note that different timezones could
  26.   have the same name.
  27. - Per timezone, keep a list with transition-times, and new timezones.
  28. - Further, use a scheme along the lines of elsie!ado's proposal, so
  29.   use files in a specified directory, and use a link to get the
  30.   local default time.
  31. Now, two typical files would look like:
  32. /etc/tz/FOT:
  33.     # FOT - Far Out Time.
  34.     FOT    +11:28        # Offset from GMT
  35.     Apr 1, 1970    FST
  36.     Apr 1, 1971    FST
  37.     Apr 1, 1972    FST.1972
  38.     ...
  39. /etc/tz/FST:
  40.     # FST - Far out Summer Time.
  41.     # Differs by 1:10 hour from FST.
  42.     FST    +12:38
  43.     Sep 1, 1970    FOT
  44.     ...
  45. /etc/tz/FST.1972:
  46.     # FST.2 - Far out Summer Time exceptional situation for 1972.
  47.     # Differs 1:11 hour from FOT.
  48.     FST    +12:39
  49.     Sep 1, 1972    FOT
  50. Note that these files should be in binary, of course, and transition
  51. times in order of ascending magnitude.
  52. Also, if you do a settz("FST"), and present a date in november,
  53. a quick binary search will immedeately get you to the Sep 1 transition,
  54. and get you to the right timezone. Note that this will *also* work for
  55. timezones with the same names: the name in col. 2 of the files, and in
  56. the settz() call, are filenames, and the first entry in the file is
  57. the name that will be used on output.
  58.  
  59. --
  60.     Jack Jansen, jack@mcvax.UUCP
  61.     The shell is my oyster.
  62.  
  63. Volume-Number: Volume 5, Number 61
  64.  
  65.