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

  1. Date: Thu, 27 Feb 86 15:11:34 PST
  2. From: seismo!sun!guy (Guy Harris)
  3.  
  4. >   My proposal's biggest (and intended) limitation is its inability to
  5. > deal with past years at all.
  6.  
  7. You *intended* to make "ctime" only work on times in the current year?  This
  8. is extremely undesirable.  Every UNIX out there can deal with this now, and
  9. people have probably written code that depends on being able to do so.  That
  10. code won't work on a system which doesn't support this.
  11.  
  12. > 4. Proposed TZ format is too unlike Sys V's. (Guy Harris)
  13. >    System V's use of difference is hours is just plain wrong for
  14. >    many places (eg., Dominican Republic, Iran, and Saudi Arabia
  15. >    where local custom dictates midnight is when the sun sets).
  16. >    I proposed using just minutes.  Guy proposes the form "[+/-]H[:m]"
  17. >    where "H" is hours and "m" is minutes.  It's a matter of choice.
  18.  
  19. It is not in the least "a matter of choice".  For one thing, I'd rather let
  20. the computer do the multiplication of 8 by 60 instead of being forced to do
  21. it myself; computers are good at that sort of thing.  For another, my
  22. proposal is an *upward compatible extension* to the System V syntax (which,
  23. BTW, the item in the System V Interface Definition under "Future
  24. Directions", where the number in TZ becomes a four-digit value of the form
  25. "hhmm", does not seem to be).  Your proposal is not an upward compatible
  26. extension to the System V syntax, as it involves changing the time zone
  27. offset to minutes - i.e., EST5EDT is no longer correct.  There have already
  28. been enough incompatible changes to UNIX by several groups with the intent
  29. of "improving" it (Berkeley's CSRG and AT&T's USDL have both done their
  30. share of this); let's try to keep that sort of thing to a minimum in the
  31. future.  (I.e., don't always take the first solution to a problem that comes
  32. to mind, or even the most aesthetically pleasing solution; sacrificing some
  33. think time or some aesthetic merit for compatibility is almost always the
  34. right thing to do.)
  35.  
  36. >    It may be preferable to use seconds to be on the safe side.
  37.  
  38. Given that most clocks used in everyday situations aren't accurate to the
  39. second, the chances of a timezone offset being specified to the second are
  40. somewhere between slim and none, unless you have an offset from UTC
  41. specified to the second due to something like not picking up a leap second
  42. (which I sincerely doubt anybody does).  Specifying the offset down to the
  43. second is overkill (note that 4.2BSD's "gettimeofday" system call fills in a
  44. structure which specifies the offset to the minute; a commendable example of
  45. restraint).
  46.  
  47. > 5. Who puts TZ and DST into a user's environment? (Guy Harris)
  48. >    The easy answer is "whatever puts TZ there now".  It is an OS
  49. >    specific mechanism.  "login" could do it or a user's login shell
  50. >    upon starting up could do it.  I didn't specify in the proposal.
  51. > 6. What about utilities not run by a logged-in user? (Guy Harris)
  52. >    Such utilities should only have to use a library call to obtain
  53. >    the timezone name (if desired) and the local time.
  54.  
  55. In this case, the library call in question had better be part of the
  56. standard.  I presume by "the local time" you really meant "the local
  57. timezone offset and the daylight savings time rules for that zone".  As
  58. such, since this implies there is a "default" time zone, why not have all
  59. the routines use this time zone if TZ is not specified in the environment?
  60. That way, 1) programs don't have to "know" that they're going to be run in
  61. such an environment and have the extra calls to get the "default" timezone
  62. information added, and 2) you don't have to bother sticking TZ in the
  63. environment unless you want to work in a timezone other than the default.
  64.  
  65. > 7. Use files to hold information about that timezone.
  66. >    (steinmetz!davidsen and ncr-sd!greg (Greg Noel))
  67. >    Using a file with the name of a timezone won't work for Daylight
  68. >    Saving Time rules because one timezone may span multiple countries
  69. >    with its named unchanged...
  70.  
  71. Arthur Olson's proposal does not require the file's name to be the same as
  72. the zone.  The zone's name is computed from information in the file.
  73.  
  74. >    For users of network file systems and diskless workstations: beware,
  75. >    proximity does not imply same rules (for a bad dream, think of a network
  76. >    that spans a timezone where there is only one file server and the rest
  77. >    of the nodes are diskless -- this contrived example is hard to solve
  78. >    with any proposal).
  79.  
  80. No, it isn't.  Here's how it could be solved, given the way Sun
  81. sets up diskless clients:
  82.  
  83.     Have the "default time zone" be specified in a file (whether the
  84.     file is a "profile" file which puts it in the environment, or
  85.     a file which is read in by the "get default timezone" routine,
  86.     or whatever is irrelevant) which is, say, in "/etc".  Make it
  87.     a symbolic link to a file in "/private/etc".  "/private", on Sun
  88.     systems, is a small private file system on the server; each client
  89.     has one of its own, to hold things like "/etc/rc.boot" which sets
  90.     the host name for the machine.  Sharing this file between all clients
  91.     obviously won't work, so the precedent for configuration files for
  92.     diskless workstations which can't be shared by all clients of its
  93.     server is already established.
  94.  
  95. >    The second point is that the name of the timezone has to be known
  96. >    somehow -- both the default timezone and, if the user selects one,
  97. >    the non-system name.  This brings to mind an easy solution of
  98. >    environment variables.
  99.  
  100. It may be easy, but it's not a solution, unless you can stuff this default
  101. timezone into the environment of every process on the system.  And if you do
  102. so in N different places, as System V currently does, it may be a solution
  103. but it's not easy.
  104.  
  105. >   Let me close with the requirements, as I see them, for the handling of
  106. > timezone and DST information.  It might be better to debate these instead
  107. > of any specific proposals.
  108.  
  109. If we're going to debate the requirements, let's not see any specific
  110. proposals until the requirements are settled, so we don't have to shoot down
  111. proposals which either don't meet the requirements or which are more complex
  112. than is needed to meet the requirements (or both!).
  113.  
  114. > 1. every site must have default information on its timezone and for DST
  115. >    rules
  116.  
  117. Every *host* must have this information, as you pointed out in the example
  118. of the diskless workstatiions.
  119.  
  120. > 2. information about the past, while it may be needed in some situations,
  121. >    is not essential
  122. > 3. information about other timezones and areas, while it may be needed
  123. >    in some situations, is not essential
  124.  
  125. Would you please explain the distinction between "needed" and "essential"?
  126. If it is truly "needed" in some situations, as opposed to "useful", it's
  127. "essential" unless the system can do without a P1003-compatible system.
  128.  
  129. > 4. a user (or program) should be allowed to change the timezone and DST
  130. >    information for their use only
  131.  
  132. 4 1/2. a consequence of this is that a program must be able to override
  133.        any setting the user has made and get the default timezone for 
  134.        that machine
  135.  
  136. Volume-Number: Volume 5, Number 63
  137.  
  138.