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

  1. From jsq  Wed Jan  1 07:52:12 1986
  2. From: std-unix%ut-sally.UUCP@SALLY.UTEXAS.EDU (Moderator, John Quarterman)
  3. Newsgroups: mod.std.unix
  4. Subject: mod.std.unix Volume 5; V5N1
  5. Message-Id: <3900@ut-sally.UUCP>
  6. Organization: IEEE/P1003 Portable Operating System Environment Committee
  7. Date: 1 Jan 86 13:51:58 GMT
  8. Draft-9: mod.std.unix
  9.  
  10. This is the first article in Volume 5 of mod.std.unix/std-unix.
  11. These volumes are strictly for administrative convenience.  This
  12. one starts now because I mailed copies of Volumes 3 and 4 to the
  13. P1003 committee chair with my ballot on the Trial Use Standard
  14. (I'm the representative of USENIX on the P1003 committee).
  15. Paper copies of volumes 1 and 2 had been delivered previously
  16. and several committee members follow the newsgroup on-line.
  17.  
  18. Feel free to continue any discussions from the previous volume
  19. or to start new discussions.
  20.  
  21.  
  22. The USENET newsgroup mod.std.unix is for discussions of UNIX standards,
  23. particularly the IEEE P1003 draft standard.  It is also distributed
  24. in an ARPA Internet mailing list.  I'm the moderator, which mostly
  25. means I post what you send me.
  26.  
  27. Submissions-To:    ut-sally!std-unix    or std-unix@sally.UTEXAS.EDU
  28. Comments-To: ut-sally!std-unix-request    or std-unix-request@sally.UTEXAS.EDU
  29. UUCP-Routes: {ihnp4,seismo,harvard,gatech}!ut-sally!std-unix
  30.  
  31. Permission to post to the newsgroup is assumed for mail to std-unix.
  32. Permission to post is not assumed for mail to std-unix-request,
  33. unless explicitly granted in the mail.  Mail to my personal addresses
  34. will be treated like mail to std-unix-request if it obviously refers
  35. to the newsgroup.
  36.  
  37. Archives may be found on sally.UTEXAS.EDU.  The current volume may
  38. be retreived by anonymous ftp (login anonymous, password guest)
  39. as ~ftp/pub/mod.std.unix, while the previous volumes may be retrieved
  40. as ~ftp/pub/mod.std.unix.v1, ~ftp/pub/mod.std.unix.v2, etc.
  41. The volume with the AT&T public domain getopt(3) is ~ftp/pub/mod.std.unix.v3.
  42.  
  43. Finally, remember that any remarks by any committee member (especially
  44. including me) in this newsgroup do not represent any position (including
  45. any draft, proposed or actual, of the standard) of the committee as a
  46. whole, unless explicitly stated otherwise in such remarks.
  47.  
  48. Volume-Number: Volume 5, Number 1
  49.  
  50. From jsq  Wed Jan  1 08:15:39 1986
  51. From: std-unix%ut-sally.UUCP@SALLY.UTEXAS.EDU (Moderator, John Quarterman)
  52. Newsgroups: mod.std.unix
  53. Subject: Access to P1003 Draft 6; V5N2
  54. Message-Id: <3901@ut-sally.UUCP>
  55. Organization: IEEE/P1003 Portable Operating System Environment Committee
  56. Date: 1 Jan 86 14:15:24 GMT
  57. Draft-9: D6.Access
  58.  
  59. I've been getting questions about how to get copies of P1003.D6,
  60. so here are the directions once again.
  61.  
  62. Balloting on Draft 6 as the Trial Use Standard just completed
  63. and resolution of the ballots will continue at least through the
  64. P1003 meeting in Denver just before the Denver USENIX this month.
  65.  
  66.  
  67. An online document which "represents" P1003 Draft 6 is on sally.UTEXAS.EDU
  68. for retrieval by anonymous ftp (connect with ftp, log in as anonymous
  69. with password guest) over the ARPA Internet.  The files are:
  70.  
  71. -rw-r--r--  1 jsq      bin        419840 Nov 27 21:48 ~ftp/pub/P1003.D6
  72. -rw-r--r--  1 jsq      bin        376814 Nov 27 21:50 ~ftp/pub/P1003.D6.doc
  73. -rw-r--r--  1 uucp     uucp       141981 Nov 22 17:37 ~ftp/pub/P1003.D6.Z
  74. -rw-r--r--  1 uucp     uucp       124055 Nov 24 01:31 ~ftp/pub/P1003.D6.doc.Z
  75. -rw-r--r--  1 jsq      bin           512 Dec  1 11:26 ~ftp/pub/P1003.D6.run
  76.  
  77. P1003.D6 is a tar archive of the source for the document.
  78. P1003.D6.doc is an nroff formatted copy of the document, suitable
  79.     for printing on a line printer (contains form feeds and backspaces).
  80. P1003.D6.Z and P1003.D6.doc.Z are compressed copies of the above files.
  81. They were compressed with compress version 4, a public domain program
  82. which has been distributed over newsgroup net.sources on USENET.
  83. There is a copy on sally.UTEXAS.EDU in ~ftp/pub/compress.shar.
  84.  
  85. P1003.D6.run is a replacement for the run script in the archive,
  86. which was for local use on decvax.  You will still need to adapt
  87. it to your printer if it's not an ln01.
  88.  
  89. The list of hosts which previously made Draft 5 available are
  90. sally.UTEXAS.EDU, as above; on UUCP:  ut-sally (contact ut-sally!jsq),
  91. decvax (contact decvax!jmcg), l5, seismo, ucbvax, munnari, and enea.
  92. Presumably they will all pick up at least the compressed files.
  93.  
  94. Those of you who have asked for copies by UUCP mail:  I've found
  95. a method; please contact me again if you're still interested.
  96. If you're on the ARPA Internet you should use ftp.
  97.  
  98. The rest of this article is a note which appears in the document:
  99.  
  100.  
  101. This online document represents, but IS NOT, the current DRAFT (Draft 6,
  102. produced 15 November 1985) of the IEEE Computer Society's P1003 Working
  103. Group for a "Portable Operating System Environment" based on the UNIX
  104. Operating System (Trademark of AT&T Bell Laboratories).
  105.  
  106. This material is copyright of IEEE, with ALL RIGHTS RESERVED.  Please
  107. respect these restrictions so we can continue to offer on-line access to
  108. the information.
  109.  
  110. If you want to join the Correspondent Group (don't expect to make
  111. meetings), the Working Group, or Balloting group for this standards
  112. effort please contact:
  113.  
  114.      Jim Isaak             decvax!frog!jim
  115.      Charles River Data Systems
  116.      983 Concord Street
  117.      Framingham, MA  01701.
  118.  
  119. (Jim needs your US Mail address to send you information about the effort;
  120. he also needs your IEEE Membership Number if you wish to join the Balloting
  121. Group).
  122.  
  123. Draft 6 was prepared for the Trial Use Balloting now taking place, with
  124. a final use ballot some time near the end of 1986.
  125.  
  126. A moderated USENET group exists for on-line discussion of this effort
  127. under the name: mod.std.unix
  128.  
  129. If you want hard copies of the DRAFT, you can obtain these from:
  130.  
  131.     Beth Cummings
  132.     IEEE Standards Office;
  133.     345 E. 47th Street
  134.     New York, NY  10017
  135.  
  136.  
  137. Volume-Number: Volume 5, Number 2
  138.  
  139. From jsq  Thu Jan  2 09:03:52 1986
  140. From: std-unix%ut-sally.UUCP@SALLY.UTEXAS.EDU (Moderator, John Quarterman)
  141. Newsgroups: mod.std.unix
  142. Subject: Time Zones; V5N3
  143. Message-Id: <3906@ut-sally.UUCP>
  144. Organization: IEEE/P1003 Portable Operating System Environment Committee
  145. Date: 2 Jan 86 15:03:27 GMT
  146. Draft-9: TZ
  147.  
  148. Date: Wed, 1 Jan 86 18:39:26 est
  149. From: seismo!cbpavo.cbosgd.ATT.UUCP!mark@sally.UTEXAS.EDU (Mark Horton)
  150.  
  151. The latest draft asked for input about time zones.  I'd like to
  152. make a few comments.
  153.  
  154. There are two basic ways that time zones are done today.  There
  155. is the V7 method (where the zone offset is in the kernel) and the
  156. System III method (where the zone offset and name is in an environment
  157. variable.)  4.2BSD descends from V7 (although it has a fancier "offset
  158. to zone name" conversion algorithm that knows more about the world)
  159. and System V descends from System III.
  160.  
  161. There are elegance considerations (e.g. should the kernel know or
  162. care about time zones?) and efficiency considerations (e.g. is it
  163. faster to look in the environment, do a system call, or read a file.)
  164. But both of these are dwarfed by a much more important consideration:
  165. does it work properly in all cases?  I claim that neither method is
  166. correct all the time, but the V7 method is right more often than the
  167. System III method.
  168.  
  169. In V7, when you configure your kernel, you tell it the zone offset,
  170. in minutes, from GMT, and whether you observe Daylight time.  These
  171. numbers are stored in the kernel, which doesn't do anything with them
  172. except return them when an ftime system call asks for them.  So, in
  173. effect, they are in the kernel for administrative convenience.  (You
  174. don't have to open a file, and they aren't compiled into ctime, so it
  175. isn't necessary to relink every program that calls ctime or localtime
  176. when you install a new system.)  The smarts that generate the time zone
  177. name and decide if Daylight time is in effect are in ctime in user code.
  178. (By comparison, in TOPS 20, the equivalent of ctime is a system call,
  179. with lots of options for the format.  This may seem inelegant, but it
  180. results in only one copy of the code on the system, even without shared
  181. libraries.)
  182.  
  183. In System III, the kernel doesn't know about time zones at all.  The
  184. environment variable TZ stores both the zone names and the zone offset,
  185. and ctime looks there.  This makes things very flexible - no assumptions
  186. about 3 character zone names, and it's easy for a person dialing in from
  187. a different time zone to run in their own time zone.  Also, it's very
  188. efficient to look in the environment - faster than a system call.
  189.  
  190. However, there are some very serious problems with the System III method.
  191. One problem is that, with an offset measured in hours, places like
  192. Newfoundland, Central Australia, and Saudi Arabia, which don't have
  193. even hour time zones, are in trouble.  But that's easy to fix in the standard.
  194.  
  195. The time zone is configured into the system by modifying /etc/profile,
  196. which is a shell script of startup commands run by the Bourne shell when
  197. any user logs in, much like .profile or .login.  This means that we assume
  198. everybody is using the Bourne shell.  This is a false assumption - one of
  199. the documented features of UNIX ever since V6 is that the shell is an
  200. ordinary program, and a user can have any shell they like.  In particular,
  201. the Berkeley C shell does not read /etc/profile, so all csh users don't get
  202. a TZ variable set up for them in every System III or V UNIX I've ever used.
  203.  
  204. Well, after all, the Bourne shell is the standard shell, and everybody should
  205. use the standard shell, right?  After all, the new Korn shell reads and
  206. understands /etc/profile.
  207.  
  208. Even if we believe the above statement and ignore the documented feature
  209. of being able to put your favorite shell in the passwd file (and I don't)
  210. we still get into trouble.  For example, uucp has a special shell: uucico.
  211. It doesn't read /etc/profile.  And what about programs that don't get run
  212. from a login shell?  For example, all the background daemons run out of
  213. /etc/rc?  Or programs run from cron?  Or from at?  Or programs run while
  214. single user?  None of these programs get a TZ.
  215.  
  216. Does it matter if a non-interactive program is in the wrong time zone?
  217. After all, the files it touches are touched in GMT.  The answer is yes:
  218. background processes generally keep logs, and the logs have time stamps.
  219. For example, uucico gets started hourly out of crontab, and this means
  220. that almost any uucico on the system (from crontab or from another system
  221. logging in) will run in the wrong time zone.  Since L.sys has restrictions
  222. on the times it can dial out, being in the wrong time zone can cause calls
  223. to be placed during the day, even if this is supposedly forbidden in L.sys.
  224. Also, of course, things like "date > /dev/console" every hour from crontab
  225. will have problems.
  226.  
  227. It turns out that System III has a "default time zone" which is used by
  228. localtime if there is no TZ variable.  On every version of System III or
  229. V I've ever used, this is set to the time zone of the developer.  It's
  230. EST in the traditional versions from AT&T.  It's PST in Xenix.  So the
  231. developers of the system never see any problems - uucp logs are right,
  232. for example, and csh users still get the right time.  Until they ship
  233. the system out of their time zone.
  234.  
  235. This problem isn't really that hard to fix.  You just have init open
  236. a configuration file when it starts up, and set its own environment
  237. from there.  (If you're willing to have init open files that early.)
  238.  
  239. But it turns out there is an even more serious problem with the TZ
  240. environment variable method.  It's a security problem.  Let's say the
  241. system administrator has configured UUCP to only call out when the
  242. phone rates are low, because the site is poor and can't afford daytime
  243. rates, or to keep the machine load low during the day.  But some user
  244. wants to push something through right away.  He sets TZ to indicate that
  245. he's in, say, China.  Now, he starts up a uucico (or a cu.)  The localtime
  246. routine believes the forged TZ and thinks it's within the allowed time zone,
  247. and an expensive phone call is placed.  The log will be made in the wrong
  248. time zone too, so unless the SA is sharp, he won't notice until the phone
  249. bill shows up.
  250.  
  251. The fundamental difference between the two approaches is that the V7
  252. method makes the timezone a per-system entity, while the Sys III method
  253. makes the timezone a per-process entity.  While an argument can be made
  254. that users dialing in from other time zones might want their processes
  255. to be in their local time zone, this isn't a very strong argument.
  256. (I've never seen anyone actually do it.)  [This is a symptom of a disease
  257. that is affecting UNIX: a tendency to put things in the environment that
  258. are not per-process.  David Yost pointed out, for example, that TERM is
  259. not a per-process entity, it's a per-port entity.  Berkeley's V6 had a
  260. file in /etc with per-port terminal codes, similar to /etc/utmp, but
  261. we've actually taken a step backwards by putting it into the environment.
  262. Take a look at tset and people's .profile's and .login's to see the
  263. complexity this decision has cost us.]
  264.  
  265. So anyway, so far I've argued that the System III method is inadequate.
  266. How about the V7 method?
  267.  
  268. The V7 method doesn't suffer from any of the weaknesses described above.
  269. It does require a system call to get the time zone, which is a bit more
  270. overhead than a getenv, and the kernel doesn't have any business knowing
  271. about time zones.  (The same argument could be made that the kernel doesn't
  272. have any business knowing the host name, too, but both System III and
  273. 4.2BSD have that information in the kernel, and it works awfully well.)
  274.  
  275. The weaknesses in the V7/4.2BSD method are in the time zone name
  276. (since it's computed from a table and the offset value) and in the
  277. rule for deciding when DST begins and ends.  The second problem is
  278. also present in the Sys III method.
  279.  
  280. Suppose localtime finds out that the offset is +60, that is, we are
  281. one hour east of GMT.  What time zone name do we use?  Well, if we're
  282. France, it might be MET (Middle European Time.)  If we're in Germany,
  283. it might be MEZ (Mitten European Zeit.)  I probably have the specifics
  284. wrong (I doubt that the French tell time in English) but you get the
  285. idea.  An offset just specifies 1/24 of the world, and moving north/south
  286. along that zone you can get a lot of countries, each with widely varying
  287. languages and time zone names.  Even Alaska/Hawaii had trouble sharing
  288. a time zone.  (The mapping in the other direction is ambiguous too, there
  289. has been lots of amusement and frustration from code that thought BST was
  290. Bering Standard Time, when run in England in July and fed the local
  291. abbreviation for British Summer Time.  This is why electronic mail and
  292. news standards currently recommend that messages be stamped in UTC.
  293. Or is that UT?  Or GMT?  Ick.)  So far we've survived because there tends
  294. to be a dominant time zone name in each zone where UNIX has appeared, and
  295. source has been present for the places that have to change it.  But as UNIX
  296. becomes more popular in places like Africa, Eastern Europe, and Asia, this
  297. will get a lot messier, especially with binary licenses.
  298.  
  299. The decision about when daylight time begins and ends is more interesting.
  300. If you read the manual page or the code, you'll discover that localtime
  301. knows rules like "the 3rd Sunday in October" and has a table with special
  302. hacks for 1974 and 1975, when the US Congress decided to change things.
  303. This table "can be extended if necessary".  Of course, extending the table
  304. means modifying the source and recompiling the world.  Might be hard on
  305. all those binary systems, especially the ones without a programmer on staff.
  306. This hasn't been a problem yet, but now Congress is making noises about
  307. moving the dates around a bit.  It's a controversial proposal, and I wouldn't
  308. be surprised if they try two or three rules before the pick one they like.
  309. Given all the old releases still out there, and the development time for
  310. a new release, we need about a 2 year warning of such an impending change.
  311. We'll be lucky to get 6 months.
  312.  
  313. So what do we do about all this?  Well, I think the basic requirements are
  314. that
  315.  
  316.  (1) The time zone should be a per-system entity.  There should only be
  317.      one place on each system where the zone is specified to ensure that
  318.      all programs on the system use the same notion of time zone.
  319.  
  320.  (2) The time zone offset, names, and daylight conventions should be
  321.      easily configured by the system administrator.  We should have a
  322.      standard that allows zone offsets in minutes (maybe even seconds,
  323.      I don't know how precise Saudi Arabia needs), zone names of arbitrary
  324.      length (they are 7 characters in Australia, for example), whether
  325.      we use daylight time at all, when daylight time begins, and when it ends.
  326.      The latter two must be allowed to vary as a function of the year.
  327.  
  328. The exact method for doing this isn't clear.  We certainly need a configuration
  329. file.  But interpreting this file on each call to ctime isn't a good idea.
  330. It would be nice to have /etc/rc look at the source file and plug a simple
  331. interpretation of it into either a binary file or the kernel, but we have
  332. to worry about what happens if the system is up (and processes are running)
  333. when we convert over to or from daylight time.  Perhaps cron has to run a
  334. program to update it every hour.  You could have cron only run this program
  335. twice a year, but this would require putting the configuration information
  336. into crontab (which doesn't understand things like "3rd Sunday in October")
  337. and would lose if the system happened to be down at conversion time.  Also,
  338. the algorithm has to work for dates that aren't this year, e.g. "ls -l" of
  339. an old file.
  340.  
  341. How much of this does P1003 need to specify?  After all, if they are just
  342. specifying sections 2 and 3, then the file format and the method for making
  343. sure things are right should be up to the implementor.  Well, at a minimum,
  344. we need ctime and localtime.  We also a standard way to get the time zone
  345. name and offset - there is a lot of ifdeffed code out there that either
  346. looks for TZ or calls ftime - and whether daylight time applies (and by
  347. how much) for a given time.
  348.  
  349. But there's more.  When the mood strikes Congress to change the rules and
  350. gives us 2 months notice, it ought to be possible to publish a new table
  351. that everybody with a P1003 system can just type in.  It would be nice if
  352. the location and format of this table were standardized.  (After all, the
  353. US Congress doesn't set the rules for the rest of the world, and they are
  354. just as subject to having arbitrary bodies with different rules.)
  355.  
  356. Finally, there needs to be a requirement that the time zone always work.
  357. Some discussion of these issues should be present.  Otherwise, some
  358. implementor is going to think that the System III method works adequately.
  359.  
  360.     Mark Horton
  361.  
  362. Volume-Number: Volume 5, Number 3
  363.  
  364. From jsq  Fri Jan  3 20:02:45 1986
  365. From: std-unix%ut-sally.UUCP@SALLY.UTEXAS.EDU (Moderator, John Quarterman)
  366. Newsgroups: mod.std.unix
  367. Subject: Time Zones; V5N4
  368. Message-Id: <3911@ut-sally.UUCP>
  369. References: <3906@ut-sally.UUCP>
  370. Organization: IEEE/P1003 Portable Operating System Environment Committee
  371. Date: 4 Jan 86 02:02:33 GMT
  372. Draft-9: TZ
  373.  
  374. Date: Fri, 3 Jan 86 11:22:50 pst
  375. From: usenix!fair@@sally.UTEXAS.EDU (Erik E. Fair)
  376.  
  377. I want to amplify what Mark Horton had to say, and also point out one
  378. more little gotcha in the System III/System V method of timezone
  379. keeping:
  380.  
  381. There are quite a few programs that purposely zap the environment for
  382. security reasons (e.g. uucico, uuxqt, getty, login), which have to be
  383. modified to pass through TZ (in addition to PATH, LOGNAME, etc.) to
  384. their children, if you want to get your time stamps right for the zone
  385. you're in (unless you're lucky enough to be in the default zone, or
  386. have the unmitigated gall to set the default to your local time zone,
  387. like AT&T).
  388.  
  389. In particular, uuxqt has to be fixed because the mail program is
  390. invoked as a child of uuxqt, and thus inherits uuxqt's environment.
  391.  
  392.     still mad about this nearly two years later,
  393.  
  394.     Erik E. Fair    ucbvax!fair    fair@ucbarpa.berkeley.edu
  395.  
  396. Volume-Number: Volume 5, Number 4
  397.  
  398. From jsq  Fri Jan  3 20:04:54 1986
  399. From: std-unix%ut-sally.UUCP@SALLY.UTEXAS.EDU (Moderator, John Quarterman)
  400. Newsgroups: mod.std.unix
  401. Subject: Re: Time Zones; V5N5
  402. Message-Id: <3912@ut-sally.UUCP>
  403. References: <3906@ut-sally.UUCP>
  404. Organization: IEEE/P1003 Portable Operating System Environment Committee
  405. Date: 4 Jan 86 02:04:43 GMT
  406. Draft-9: TZ
  407.  
  408. Date: Fri, 3 Jan 86 09:52:13 est
  409. From: harvard!encore!babel!ptw@sally.UTEXAS.EDU (P. Tucker Withington)
  410.  
  411. In Mark's comments about time zones the only "insurmountable" problem he
  412. found with the Sys III method was his security hole, that a user could
  413. force uucp's L.sys table to be interpreted incorrectly.
  414.  
  415. The real problem is that the L.sys entry is ambiguous, unless a TZ
  416. is given to interpret it.  The solution here is akin to having "init"
  417. set a default time zone.  uucico needs to have a profile that defines
  418. the timezone L.sys is to be interpreted relative to, which overrides any
  419. user setting of TZ.  Alternatively, the L.sys entries could be "fully
  420. specified", including a time zone or defined to be GMT.
  421.  
  422. The objection to putting TZ in the environment is not specific to TZ,
  423. it is a general problem with the implementation of environment.  (There
  424. probably should be some shared environment, in addition to private
  425. environment, so that "constants" like TERM and TZ are not carried around
  426. as excess baggage by each process.)
  427.  
  428. I conclude that the System III time zone mechanism is then equal to the
  429. V7 mechanism, with the advantage that each user can operate in whatever
  430. time zone he likes.
  431.  
  432. Regarding the daylight savings bugaboo:  I feel this is a red herring.
  433. You probably care when the present time is DST, but being off by +/-
  434. 1 hour on ancient file dates is not going to really bother anyone.  Thus
  435. it is probably sufficient to have a shell script in your profile to set
  436. any "exceptional" DST times.
  437.  
  438. Volume-Number: Volume 5, Number 5
  439.  
  440. From jsq  Sat Jan  4 17:40:02 1986
  441. From: std-unix%ut-sally.UUCP@SALLY.UTEXAS.EDU (Moderator, John Quarterman)
  442. Newsgroups: mod.std.unix
  443. Subject: Re: Time Zones; V5N6
  444. Message-Id: <3917@ut-sally.UUCP>
  445. References: <3906@ut-sally.UUCP> <3912@ut-sally.UUCP>
  446. Reply-To: hokey@plus5.UUCP (Hokey)
  447. Organization: IEEE/P1003 Portable Operating System Environment Committee
  448. Date: 4 Jan 86 23:39:49 GMT
  449. Draft-9: TZ
  450.  
  451. From: plus5!hokey@sally.UTEXAS.EDU (Hokey)
  452. Date: Sat, 4 Jan 86 12:21:58 CST
  453.  
  454. >Date: Fri, 3 Jan 86 09:52:13 est
  455. >From: harvard!encore!babel!ptw@sally.UTEXAS.EDU (P. Tucker Withington)
  456. >
  457. >Regarding the daylight savings bugaboo:  I feel this is a red herring.
  458. >You probably care when the present time is DST, but being off by +/-
  459. >1 hour on ancient file dates is not going to really bother anyone.  Thus
  460. >it is probably sufficient to have a shell script in your profile to set
  461. >any "exceptional" DST times.
  462.  
  463. This situation is precisely why all timestamps should be kept in GMT.
  464.  
  465. At the systems level there can be problems with make, backups, and cron,
  466. and at the applications level there can be problems tracking events (this
  467. becomes critical in, for example, health care.  Looks kinda strange when
  468. critical tests are performed, say, a half hour after a patient dies (or
  469. when there is an hour gap between patient admission and performance of the
  470. tests).
  471.  
  472. [ Make uses the internal system format; I don't believe anyone has argued
  473. that that should be anything but GMT.  It is not clear (at least to me)
  474. that keeping the human-readable presentation formats used by things like
  475. cron in GMT instead of local time will decrease human errors:  people do
  476. mostly think in local time.  -mod ]
  477.  
  478. -- 
  479. Hokey           ..ihnp4!plus5!hokey
  480.           314-725-9492
  481.  
  482. Volume-Number: Volume 5, Number 6
  483.  
  484. From jsq  Sun Jan  5 10:23:51 1986
  485. From: std-unix%ut-sally.UUCP@SALLY.UTEXAS.EDU (Moderator, John Quarterman)
  486. Newsgroups: mod.std.unix
  487. Subject: Re: Time Zones; V5N7
  488. Message-Id: <3920@ut-sally.UUCP>
  489. Organization: IEEE/P1003 Portable Operating System Environment Committee
  490. Date: 5 Jan 86 16:23:40 GMT
  491. Draft-9: TZ
  492.  
  493. Date: Sun, 5 Jan 86 00:52:37 est
  494. From: seismo!harvard!think!mit-eddie!barmar@sally.UTEXAS.EDU (Barry Margolin)
  495.  
  496. In response to Mark Horton's posting about time zones:
  497.  
  498. Multics has long had per-process time zones, and they are extremely
  499. heavily used on systems which have users logging in from across the
  500. country (or world, in some cases).  Most of the people in my Cambridge,
  501. MA office use a system in Phoenix, AZ quite a bit, and I am considered
  502. unusual because I don't bother to set my time zone to EST.
  503.  
  504. One good argument for only having system zones that was made was about
  505. software that makes critical decisions based on the time of day (the
  506. example was a wrapper for uucico that makes sure the call isn't being
  507. made during the day).  The solution is for such programs to ignore
  508. the TZ inherited from the caller, perhaps using a new system call
  509. that gets the system-default time zone.  We don't have this problem
  510. on Multics because security decisions are either made in daemon processes
  511. or in inner-ring subroutines, and per-process variables are actually
  512. per-process per-ring, so the user's personalization generally doesn't
  513. affect secure domains.
  514.  
  515. One apparent difference in time zone semantics between Unix and Multics
  516. is the behavior of past/future times.  On Multics, the time zone in which
  517. a date/time should be converted to GMT is an INPUT parameter, defaulting
  518. to the process' time zone; we do not attempt to determine whether DST
  519. was in effect on the date being converted.  We therefore have no need
  520. for complex DST calculation at run time.  Whether this is considered
  521. right or wrong is mostly a matter of taste; I know of a other systems
  522. that have chosen to dynamically determine DST.  In general, a subroutine
  523. for converting a time in a specified time zone to GMT is a useful
  524. facility; for instance, to interpret Date fields in mai headers.
  525.  
  526. I have been thinking about WHY many systems try to determine the
  527. DST state at a given time.  This is because they only store the binary
  528. form of the time in various system databases, and attempt to display
  529. the user-relative time at which the event took place (for instance,
  530. so that you can tell that it was very late when the user modified
  531. a file, so the bugs are probably because he was tired).  The "right"
  532. way to get this effect would be to store the user's personal time zone
  533. in addition to the binary time.  Display routines would display the
  534. time in the retrieved time zone, rather than trying to guess the appropriate
  535. time zone.  In the context of Unix standardization, this is probably
  536. unreasonable, as it is not consistent with any existing version of Unix.
  537. It also has the problem that it increases the size of times stored in
  538. many system databases, which may be considered wasteful for the little
  539. benefit that this approach provides.
  540.     Barry Margolin
  541.     ARPA: barmar@MIT-Multics
  542.     UUCP: ..!genrad!mit-eddie!barmar
  543.  
  544. Volume-Number: Volume 5, Number 7
  545.  
  546. From jsq  Mon Jan  6 08:50:56 1986
  547. From: std-unix%ut-sally.UUCP@SALLY.UTEXAS.EDU (Moderator, John Quarterman)
  548. Newsgroups: mod.std.unix
  549. Subject: What do you call an ex-directory?; V5N8
  550. Message-Id: <3921@ut-sally.UUCP>
  551. Organization: IEEE/P1003 Portable Operating System Environment Committee
  552. Date: 6 Jan 86 14:50:44 GMT
  553. Draft-9: 5.2
  554.  
  555. Date: Sun, 5 Jan 86 19:14:39 est
  556. From: seismo!allegra!phri!roy@sally.UTEXAS.EDU (Roy Smith)
  557. Subject: What do you call an ex-directory? (or, "it's not dead, just sleeping")
  558.  
  559.     This may fall more into the category of a trivia question rather
  560. than something that demands being standardized, but here goes anyway.  Try
  561. the following:
  562.  
  563.     % mkdir temp
  564.     % cd temp
  565.     % csh
  566.     % cd ..
  567.     % rmdir temp
  568.     % exit
  569.     % pwd
  570.  
  571.     I just did that on my 4.2 system and got back "/".  If I remember
  572. correctly, the corresponding sequence on version 6, using sh instead of csh
  573. of course, would give you "".  Is there a standard for what getwd() should
  574. return in the face of an error?  Should there be (i.e. is it worth it)?  It
  575. seems to me that the version 6 answer is somehow more accurate, even if it
  576. is not actually any more useful.
  577.  
  578. Roy Smith <allegra!phri!roy>
  579. System Administrator, Public Health Research Institute
  580. 455 First Avenue, New York, NY 10016
  581.  
  582. Volume-Number: Volume 5, Number 8
  583.  
  584. From jsq  Mon Jan  6 18:29:03 1986
  585. From: std-unix%ut-sally.UUCP@SALLY.UTEXAS.EDU (Moderator, John Quarterman)
  586. Newsgroups: mod.std.unix
  587. Subject: Re: Time Zones; V5N9
  588. Message-Id: <3928@ut-sally.UUCP>
  589. Organization: IEEE/P1003 Portable Operating System Environment Committee
  590. Date: 7 Jan 86 00:28:50 GMT
  591. Draft-9: TZ
  592.  
  593. From: seismo!allegra!druil!khw@sally.UTEXAS.EDU
  594. Date: Mon, 6 Jan 86 17:55:22 EST
  595.  
  596. I strongly oppose using a centralized time zone for each
  597. computer.  It is unnecessarily constricting, creates problems
  598. with networking computers together and with daylight savings, and
  599. is not necessary.
  600.  
  601. The major reason I read in Mark Horton's article for not using
  602. decentralized time zones is that security holes exist with system
  603. programs getting fooled about what time it really is.
  604.  
  605. The reason they are getting fooled is not because
  606. of the decentralized nature of the time zone setting, but because
  607. they don't keep their internal times in some standard time zone.
  608.  
  609. I claim that all programs that care about time should keep all
  610. times internally in GMT (or UCT or whatever you want to call it), and
  611. convert from/to local time on input/output.  This is, in fact, the
  612. only way they can not be upset when the time zone of the computer
  613. suddenly changes (which in effect it does when daylight savings
  614. comes and goes).
  615.  
  616. We are running System III.  We have a calendar application.  Users
  617. were upset when the meetings they had scheduled for 8 am,
  618. (with the onset of DST) appeared for 9 am.
  619. The problem was the application was keeping stuff in local time,
  620. and not being very smart about it.
  621. A simple revision to use GMT instead fixed this problem, with
  622. the application not knowing or caring if DST is in effect or
  623. not.
  624.  
  625. My understanding of the centralized proposal is that this
  626. would not longer be possible, that the computer itself would
  627. change times when DST started and ended.
  628.  
  629. Programs are like people; they get jet-lag when crossing
  630. time zones too fast, and for a program one time zone is
  631. too fast, unless a lot of care has been taken in writing it.
  632.  
  633. What you want is a processor that steadily ticks along with
  634. only slight corrections to the time while running to correct
  635. clock drift.  Changing states to kill off running processes,
  636. changing the time, and restarting may be acceptable in most
  637. environments that Unix has run in currently, but we should
  638. not restrict it to these environments.  I want to be able
  639. to sell Unix to hospitals, for example.
  640.  
  641. We have been mostly lucky because savings time changes in the US at
  642. a time when there isn't much going on, and people don't
  643. notice what happens to, say, at and cron when the clock
  644. changes under them, because they don't do much at that
  645. time of day.  But with world-wide access to central computers on the
  646. horizon, and in some applications (such as hospitals) this is
  647. changing.
  648.  
  649. Networks will shortly progress to the state where
  650. a common time shared by all elements is very desirable,
  651. and this might as well be the current world standard GMT.
  652. Such a common time is the only way to prevent ambiguities,
  653. and changing centralized times to compensate for DST
  654. will introduce these ambiguities.
  655.  
  656. The problem with System III (besides rc not setting
  657. a default TZ that is passed on) is 1) the daylight
  658. algorithm is centralized.  You really want an algorithm
  659. on a per process-group basis, that allows people
  660. from multiple countries that have different daylight
  661. savings definitions to call up and get the one suitable
  662. for them.  2) The syntax for the timezone allows only
  663. multiples of hours.  Otherwise the problems come from
  664. system programs which use local time, not GMT.
  665.  
  666. If the system programs were changed to use GMT, then cat'ing
  667. their files out would not show the time in terms that the
  668. System Administrator was used to (unless s/he is located
  669. in GMT).  A filter could be used to translate these,
  670. or the SA could get used to reading GMT.  With lengthy
  671. networks, the SA should be reading in GMT anyway to
  672. keep from getting confused when troubleshooting problems
  673. with another element on the network that isn't in the same
  674. zone.
  675.  
  676. I claim that switching to a single centralized timezone
  677. is short-sighted.  It may work for most applications
  678. we have now, but it is not the way to go for the future.
  679.  
  680.         Karl Williamson
  681.         ATT ISL Denver
  682.         ihnp4!druil!khw
  683.         303-538-4583
  684.  
  685.  
  686. Volume-Number: Volume 5, Number 9
  687.  
  688. From jsq  Tue Jan  7 21:45:55 1986
  689. From: std-unix%ut-sally.UUCP@SALLY.UTEXAS.EDU (Moderator, John Quarterman)
  690. Newsgroups: mod.std.unix
  691. Subject: Re: Time Zones; V5N10
  692. Message-Id: <3943@ut-sally.UUCP>
  693. References: <3928@ut-sally.UUCP>
  694. Organization: IEEE/P1003 Portable Operating System Environment Committee
  695. Date: 8 Jan 86 03:45:44 GMT
  696. Draft-9: TZ
  697.  
  698. Date: Tue, 7 Jan 86 11:10:22 pst
  699. From: usenix!fair@UCBVAX.BERKELEY.EDU (Erik E. Fair)
  700.  
  701. This is as much a human interface issue as anything else, and I assert
  702. that it is wrong to force a system administrator (or anyone else) to
  703. think in other than his own time zone. The only exception to this rule
  704. that I can imagine is in networking, wherein it is easiest if all
  705. timestamps are in GMT (or some other absolute measure) so that
  706. calculation of the relative times of various network wide events is
  707. simpler.
  708.  
  709.     Erik E. Fair    ucbvax!fair    fair@ucbarpa.berkeley.edu
  710.  
  711. Volume-Number: Volume 5, Number 10
  712.  
  713. From jsq  Tue Jan  7 22:18:13 1986
  714. From: std-unix%ut-sally.UUCP@SALLY.UTEXAS.EDU (Moderator, John Quarterman)
  715. Newsgroups: mod.std.unix
  716. Subject: Re: Time Zones; V5N11
  717. Message-Id: <3945@ut-sally.UUCP>
  718. References: <3928@ut-sally.UUCP>
  719. Organization: IEEE/P1003 Portable Operating System Environment Committee
  720. Date: 8 Jan 86 04:18:02 GMT
  721. Draft-9: TZ
  722.  
  723. Date: Tue, 7 Jan 86 16:56:17 est
  724. From: seismo!cbpavo.cbosgd.ATT.UUCP!mark@sally.UTEXAS.EDU (Mark Horton)
  725. Organization: AT&T Bell Laboratories, Columbus
  726.  
  727. >What you want is a processor that steadily ticks along with
  728. >only slight corrections to the time while running to correct
  729. >clock drift.
  730.  
  731. Exactly.  This is what UNIX does now, and I am not suggesting
  732. any changes to this behavior.  What V7 does is keep internal
  733. time as time_t in GMT, and next to it are a couple of flags
  734. representing offset from GMT and a daylight flag.  These two
  735. flags don't affect the time(2) call, they are just passed to
  736. the ctime(3) routine when it asks the kernel for them with ftime(2).
  737. The local time is then calculated, taking these into account.
  738.  
  739. >I claim that all programs that care about time should keep all
  740. >times internally in GMT (or UCT or whatever you want to call it), and
  741. >convert from/to local time on input/output.  This is, in fact, the
  742. >only way they can not be upset when the time zone of the computer
  743. >suddenly changes (which in effect it does when daylight savings
  744. >comes and goes).
  745.  
  746. What do you mean "keep all times internally"?  If you're referring to
  747. such things as the L.sys UUCP database, I think it's obvious that this
  748. has to be in local time (not only because of the potential for human
  749. error otherwise, but because you'd have to change it by hand every time
  750. you go into or out of daylight time if it were in GMT.)  If you're
  751. referring to local timestamps, then certimely a time_t (seconds since
  752. Midnight, Jan 1, 1970, GMT) is a good way to do this, if you don't have
  753. to represent dates before 1970, like birth dates.
  754.  
  755. >My understanding of the centralized proposal is that this
  756. >would not longer be possible, that the computer itself would
  757. >change times when DST started and ended.
  758.  
  759. Not at all.  What changes is the way the time is displayed to users,
  760. displayed in log files, and interpreted when a user inputs a time.
  761. Clearly such uses should be in the local time zone.  (Whether this means
  762. "local" for the machine or for the user is apparently an open issue.)
  763.  
  764. I gather you are not suggesting that you have a need for a particular
  765. process (or user) to indicate he's in a different time zone from the
  766. system default, although apparently at least one other person has
  767. indicated that on MULTICS people do this.  I wonder if anybody uses
  768. this ability on UNIX?
  769.  
  770. >We have been mostly lucky because savings time changes in the US at
  771. >a time when there isn't much going on, and people don't
  772. >notice what happens to, say, at and cron when the clock
  773. >changes under them, because they don't do much at that
  774. >time of day.  But with world-wide access to central computers on the
  775. >horizon, and in some applications (such as hospitals) this is
  776. >changing.
  777.  
  778. If I were running a 24 hour critical application, such as a hospital,
  779. I would demand that all time logs be 100% correct.  Since the real
  780. clock jumps forward or backward by an hour twice a year, the logs had
  781. better do this too (and include the time zone so you can tell if 2:30 AM
  782. was the first or second 2:30 that night.).  UNIX already does this quite
  783. nicely (at least in the USA, until Congress decides to change the rules.)
  784.  
  785.     Mark
  786.  
  787. [ A couple of readers have taken the moderator to task for posting
  788. the article to which Mark replies here, since it was clearly based
  789. on a misunderstanding both of what Mark proposed and what UNIX does.
  790. I posted it because I thought it would give Mark a good opportunity
  791. to clarify the points on which both that and a previous article showed
  792. confusion.  I believe he does so ably here.  However, I will probably
  793. be more strict in the future in winnowing such submissions as the one
  794. to which he is replying.
  795.  
  796. I solicit further input on this as well as any other thoughts by
  797. readers on how moderation is done in this newsgroup.  For instance:
  798. the V5N11 is in the Subject line because one notes reader wanted it
  799. there; yet another notes reader complains that it interferes with the
  800. subject kill capability of notes.  Other opinions?  -mod ]
  801.  
  802. Volume-Number: Volume 5, Number 11
  803.  
  804. From jsq  Wed Jan  8 09:01:32 1986
  805. From: std-unix%ut-sally.UUCP@SALLY.UTEXAS.EDU (Moderator, John Quarterman)
  806. Newsgroups: mod.std.unix
  807. Subject: Re: What do you call an ex-directory?; V5N12
  808. Message-Id: <3948@ut-sally.UUCP>
  809. References: <3921@ut-sally.UUCP>
  810. Organization: IEEE/P1003 Portable Operating System Environment Committee
  811. Date: 8 Jan 86 15:01:20 GMT
  812. Draft-9: 5.2
  813.  
  814. Date: Tue, 7 Jan 86 22:30:26 MST
  815. From: seismo!hao!boulder!geoff@sally.UTEXAS.EDU (Geoffrey Clemm)
  816. Organization: University of Colorado, Boulder
  817.  
  818. In article <3921@ut-sally.UUCP> Roy Smith writes:
  819.  
  820. >From: seismo!allegra!phri!roy@sally.UTEXAS.EDU (Roy Smith)
  821. >Subject: What do you call an ex-directory? (or, "it's not dead, just sleeping")
  822. >I [deleted my current directory] on a 4.2 system and got back "/" frow pwd. 
  823. >The corresponding sequence on version 6, using sh instead of csh
  824. >of course, would give you "".
  825. ...
  826. >It seems to me that the version 6 answer is somehow more accurate, even if it
  827. >is not actually any more useful.
  828.  
  829. On a 4.3 system, you get back :
  830.  
  831.   pwd: getwd: can't stat .
  832.  
  833. which seems far better than either the version 6 or the 4.2 response.
  834.  
  835. Geoff Clemm
  836.  
  837. Volume-Number: Volume 5, Number 12
  838.  
  839. From jsq  Thu Jan  9 13:11:35 1986
  840. From: std-unix%ut-sally.UUCP@SALLY.UTEXAS.EDU (Moderator, John Quarterman)
  841. Newsgroups: mod.std.unix
  842. Subject: Re: Time Zones; V5N13
  843. Message-Id: <3960@ut-sally.UUCP>
  844. References: <3906@ut-sally.UUCP>
  845. Reply-To: davidsen@kbsvax.UUCP (Davidsen)
  846. Organization: IEEE/P1003 Portable Operating System Environment Committee
  847. Keywords: TZ
  848. Date: 9 Jan 86 19:11:17 GMT
  849. Draft-9: TZ
  850.  
  851. Date: Thu, 9 Jan 86 11:39:06 est
  852. From: Davidsen <seismo!rochester!steinmetz!davidsen@sally.UTEXAS.EDU>
  853. Organization: GE CRD, Schenectady, NY
  854.  
  855. The recent posting on TZ implementation has prompted discussion at our site,
  856. with the following comments and suggestions:
  857.  
  858. 1) Process TZ is very useful. We use systems in Chicago and Minn, and would
  859. like our times as displayed to be meaningful. We regularly reset TZ in our
  860. .profile on these systems.
  861.  
  862. 2) An extension is needed to handle cases where the TZ offset is not an even
  863. hour, and where the daylight savings time calculation is not the (current) US
  864. standard. We even were so bold as to envision one method of doing this.
  865.  
  866. The proposed solution is to give a TZ value having no offset, simply a series
  867. of characters as the identifier, as "TZ=PILST". When a TZ without an offset
  868. was located, a directory would be searched for a file with the same name. For
  869. illustration, call this /usr/bin/TZ. When the matching file was executed using
  870. the date for an argument, the correct offset from GMT would be returned in
  871. clock ticks. This value could then be added to the current GMT value to get
  872. "process local" time.
  873.  
  874. Note: what is important
  875. is that the processes are user (sysmgr) definable to match changing local
  876. laws, etc. I would feel that it is acceptable to require reboot of the system
  877. to change these procedures, so some pointers or even the process itself(?)
  878. could be kept in memory to speed things up.
  879. These routines would have to be executed fairly often, since the
  880. change points of the algorithms might be anywhere. Another suggestion was to
  881. make these routine devices, and install them as device drivers.
  882.  
  883. The example time zone, PILST, stands for the hypothetical "Pothole IL Local
  884. Standard Time", which is 4:17 ahead of the rest of the state because the clock
  885. in town hall is off by that much. This example is less funny if you look at
  886. the number of entire countries in conventional time zones, particularly those
  887. shared by Eurasia and Africa. Hospitals might want to shift the change to
  888. daylight time by some hours to minimize the posibility of error, and could,
  889. using this solution, have their own "hospital standard time".
  890.  
  891. The problem of time for uucp and at are not as simple as they seem. If I want
  892. to run a job during off hours, 0100 means 1am, computer time. If I want to
  893. have the system call me back at 3:30pm local time to test a new uucp or
  894. something, I mean my local time. If I make a cron entry to run uucico at a
  895. given time, it uses the default shell timezone, while incoming calls use the
  896. system, since the are not executed under a shell. This confuses the logfiles
  897. no end. One of our sysmgrs keeps the system time at GMT rather than EST5EDT
  898. (for valid reasons, but complex), which really messes up the log. I think the
  899. solution to that would be to have uucico use some known TZ rather than the
  900. inherited TZ (/usr/lib/uucp/TZ anyone?). This would keep the logs consistant.
  901.  
  902. Obviously the times in L.sys should be to a standard, but should it be local
  903. time or destination time. Since the anther is "both", a TZ field may have to
  904. be added to L.sys, since local time is what I use to control my phone bill,
  905. but destination time is what I use if a remote system is only up for uucp at
  906. certain times.
  907.  
  908. Hopefully these ideas will inspire some constructive followup.
  909.  
  910.     -bill davidsen
  911.  
  912.     seismo!rochester!steinmetz!--\
  913.        /                               \
  914. ihnp4!              unirot ------------->--- crdos1!davidsen
  915.        \                               /
  916.         chinet! ---------------------/
  917.  
  918. "It seemed like a good idea at the time..."
  919.  
  920. Volume-Number: Volume 5, Number 13
  921.  
  922. From jsq  Thu Jan  9 19:11:29 1986
  923. From: std-unix%ut-sally.UUCP@SALLY.UTEXAS.EDU (Moderator, John Quarterman)
  924. Newsgroups: mod.std.unix
  925. Subject: TZ and TERM per process; V5N14
  926. Message-Id: <3961@ut-sally.UUCP>
  927. Organization: IEEE/P1003 Portable Operating System Environment Committee
  928. Date: 10 Jan 86 01:11:09 GMT
  929. Draft-9: TERM TZ
  930.  
  931. From: ukc!minster!forsyth
  932. Date: Thu, 9 Jan 86 18:03:15 GMT
  933.  
  934. It can be helpful for TZ to be a per-process value (eg, in the
  935. environment).  For instance, if I am logged in to a computer
  936. several time zones away, with TZ set to reflect my local time,
  937. I might say
  938.  
  939.     echo "echo go to the pub | write $NAME" | at 7pm
  940.  
  941. to get a message at 7pm my time, or (in the same session)
  942.  
  943.     TZ= at 3am <ada-testrun
  944.  
  945. to cause a long-running job to be started on the remote
  946. system at a little-used time (their time).
  947.  
  948. Similarly, I might set TERM per process if I wish
  949. to check the output of a supposedly terminal-independent
  950. program for different terminal types:
  951.     TERM=vt100 greeneking | vis
  952.     TERM=520 greeneking | vis
  953.     ...
  954. I might do something similar if running emulators in
  955. different layers, though arguably that might be handled
  956. by the ``per port'' notion.  (Although /etc/ttytype or
  957. whatever is hard pressed to deal with people logging
  958. in on different terminals on the same network or dial-in
  959. port.)
  960.  
  961. There are other ways of doing these things,
  962. but I find this compositional style more attractive
  963. than, say, -l (local time) or -z (time zone) options
  964. to `at' and other commands.
  965. I'd be interested to see other approaches.
  966.  
  967. Volume-Number: Volume 5, Number 14
  968.  
  969. From jsq  Fri Jan 10 20:15:51 1986
  970. From: std-unix%ut-sally.UUCP@SALLY.UTEXAS.EDU (Moderator, John Quarterman)
  971. Newsgroups: mod.std.unix
  972. Subject: Re: TZ and TERM per process; V5N15
  973. Message-Id: <3972@ut-sally.UUCP>
  974. References: your article <3961@ut-sally.UUCP>
  975. Organization: IEEE/P1003 Portable Operating System Environment Committee
  976. Date: 11 Jan 86 02:15:40 GMT
  977. Draft-9: TERM TZ
  978.  
  979. From: seismo!harvard!prime!steveg@sally.UTEXAS.EDU (Steve Glaser)
  980. Date: Fri, 10 Jan 86 18:33:48 est
  981.  
  982. By the way, another example of a program that uses local time for its logs is
  983. SCCS (and RCS).  I've had cases where I was trying to check something in around
  984. the timezone switch and SCCS wouldn't let me do it (cause the new release
  985. was older than the old release).  I don't know what posessed the folks
  986. at Bell to use local time on this one.
  987.  
  988.  
  989.     Steve Glaser
  990.     harvard!prime!steveg
  991.  
  992. Volume-Number: Volume 5, Number 15
  993.  
  994. From jsq  Sun Jan 12 10:26:32 1986
  995. From: std-unix%ut-sally.UUCP@SALLY.UTEXAS.EDU (Moderator, John Quarterman)
  996. Newsgroups: mod.std.unix
  997. Subject: Re: TZ and TERM per process; V5N16
  998. Message-Id: <3976@ut-sally.UUCP>
  999. References: <3961@ut-sally.UUCP>
  1000. Organization: IEEE/P1003 Portable Operating System Environment Committee
  1001. Date: 12 Jan 86 16:26:21 GMT
  1002. Draft-9: TERM TZ
  1003.  
  1004. [ Let me reiterate something that many people do not seem to realize:
  1005. UNIX has *always* kept internal time in GMT; that is not an issue.
  1006.  
  1007. Joe Yao's summary below covers most of the actual issues.
  1008. If you do not agree with parts (or all) of it, submit your comments.
  1009. But no flames please.  This is a technical discussion newsgroup,
  1010. not a boxing ring.  -mod ]
  1011.  
  1012. Date: Sat, 11 Jan 86 15:08:53 est
  1013. From: seismo!hadron!jsdy@sally.UTEXAS.EDU (Joseph S. D. Yao)
  1014. Organization: Hadron, Inc., Fairfax, VA
  1015.  
  1016. Following this discussion, it is clear that a number of different
  1017. things are needed.  We need:
  1018. (1) a way to be sure that logs are kept in one, single, system-
  1019.     appropriate time;
  1020. (2) a way that people can set times reported to them to be meaningful;
  1021. (3) a way that people can enter times in a way that is meaningful to
  1022.     the system, but also understood correctly by the machine (with at
  1023.     or cron or remind as cases in point);
  1024. (4) a standard for individual machines to tell (over nets) other
  1025.     machines what time they think it is;
  1026. (5) perhaps an 'rtime' facility, to know what time it is elsewhere?;
  1027. [ Much work has been done on 4 and 5.  I will post a followup article.  -mod ]
  1028. (6) a way to be sure that processes can't override system time limits
  1029.     by changing the time (such as with UUCP);
  1030. (7) a way for system managers to be able to specify either a default
  1031.     "time zone" or a way of figuring out (from 0 to infinity) what
  1032.     the time really is/was.
  1033. Probably several other things, as well.
  1034.  
  1035. It's not clear that only one mechanism will take care of all of these.
  1036. For instance, agreeing to allow a time zone specifier in input formats
  1037. certainly addresses a lot of these.  But, what about "Pothole IL Local
  1038. Standard Time" (EST+0:04:17)?  We will need some way to figure out time
  1039. zones that are not exactly integral hours off from UCT.  I don't like
  1040. particularly the idea of user-written time agents, partly because I
  1041. know how often "professional software engineer"s make little (or big)
  1042. mistakes, especially in the area of not testing all boundary
  1043. conditions, and I can imagine those who aren't constantly engineering
  1044. software might make even more.  Perhaps we can figure out a way to
  1045. specify the rules for a time zone in a user-writable table, so that
  1046. if politicians decide to mess us up even further we can just send a
  1047. few lines of table over the net to patch the algorithm.  Note that
  1048. the algorithm  s h o u l d  work "from 0 to infinity."
  1049.  
  1050. [ It should also work from zero to negative infinity.  -mod ]
  1051.  
  1052.                             And, of course,
  1053. each process group (or maybe process) might want to have an idea of
  1054. what its own expression of time is; but should be able to get at the
  1055. system's idea, too.  (Just for Rob Pike, a date -[lsv]?)  As an under-
  1056. lying time, of course, it is good to get machines to think and talk
  1057. to each other in UCT (GMT), as radio operators do, since that is one
  1058. of the things it was invented for!
  1059.  
  1060. [ Once more:  internal (kernel) UNIX time format is GMT, and that's also
  1061. what has always been used on networks like the ARPANET for communication
  1062. between systems, whether UNIX, TOPS-20, Multics, or whatever.  -mod ]
  1063.  
  1064.                     It is (so far) independent of
  1065. astronomical or political changes in the "real" time.  We'll see how
  1066. this works once we start talking in terms of relativistic distances
  1067. [;-)].
  1068.  
  1069. [note: deference to rob pike, whose talk "cat -v considered harmful"
  1070. was actually a good expose' on creeping featurism.  -jsdy-]
  1071.  
  1072. [ The talk of that name was originally given at the Toronto (Summer 1983)
  1073. USENIX Conference and has an abstract in those proceedings.  A paper in
  1074. the same vein is:
  1075.  
  1076.           Pike1984.       R. Pike and B. W. Kernighan, "Program Design
  1077.                           in  the  UNIX  Environment," [BLTJ1984], pp.
  1078.                           1595-1605, 1984.
  1079.  
  1080. That journal issue is now selling for a reasonable price, I hear.
  1081. (I don't know what the price is or what the telephone number is.)
  1082.  
  1083.           BLTJ1984.       BLTJ,   "The   UNIX   System,"   AT&T   Bell
  1084.                           Laboratories Technical Journal, vol. 63, no.
  1085.                           8, American Telephone and Telegraph Company,
  1086.                           Short Hills, N.J., October 1984.
  1087.  
  1088. And if you like the article, you'll love the book:  :-)
  1089.  
  1090.           Kernighan1984.  Brian W. Kernighan and Rob  Pike,  The  UNIX
  1091.                           Programming    Environment,   Prentice-Hall,
  1092.                           Inc., New Jersey, 1984.
  1093.  
  1094. -mod ]
  1095. -- 
  1096.  
  1097.     Joe Yao        hadron!jsdy@seismo.{CSS.GOV,ARPA,UUCP}
  1098.  
  1099. Volume-Number: Volume 5, Number 16
  1100.  
  1101. From jsq  Sun Jan 12 12:00:16 1986
  1102. From: std-unix%ut-sally.UUCP@SALLY.UTEXAS.EDU (Moderator, John Quarterman)
  1103. Newsgroups: mod.std.unix
  1104. Subject: ARPA Internet Time Protocols; V5N17
  1105. Message-Id: <3977@ut-sally.UUCP>
  1106. References: <3976@ut-sally.UUCP>
  1107. Organization: IEEE/P1003 Portable Operating System Environment Committee
  1108. Date: 12 Jan 86 18:00:03 GMT
  1109. Draft-9:
  1110.  
  1111. A wheel that frequently gets reinvented is how to tell the time over networks.
  1112. Much work has been done on this subject in the ARPA Internet from back when
  1113. there was only the ARPANET up to a few months ago.  This article is a brief
  1114. summary of the existing methods.
  1115.  
  1116. Herein GMT and UT are used as synonyms for Coordinated Universal Time.
  1117.  
  1118. Here is a list of references in (mostly) chronological order, to be followed
  1119. by abstracts of or comments on each.  Probably the most widely used protocol
  1120. is RFC868.  Possibly the best for what it tries to do is RFC958.  For use
  1121. in synchronizing clocks of machines on a local area network, TSP will likely
  1122. become increasingly important, because it will come with 4.3BSD.  Several
  1123. higher-level schemes employ RFC792.
  1124.  
  1125. If there is sufficient interest, I will post the relevant RFCs to mod.sources.
  1126.  
  1127. (RFC792) Sep 81    (Postel)      Internet Control Message Protocol  
  1128. (RFC778) 18 Apr 81 (Mills)       DCNet Internet Clock Service
  1129. (RFC867) May 83    (Postel)      Daytime Protocol
  1130. (RFC868) May 83    (Postel)      Time Protocol
  1131. (RFC956) Sep 85    (Mills)       Algorithms for Synchronizing Network Clocks  
  1132. (RFC957) Sep 85    (Mills)       Experiments in Network Clock Synchronization  
  1133. (RFC958) Sep 85    (Mills)       Network Time Protocol  
  1134. TSP: The Time Synchronization Protocol for UNIX 4.3BSD, R. Gusella and S. Zatti
  1135.  
  1136.  
  1137. (RFC792) Sep 81    (Postel)      Internet Control Message Protocol
  1138.  
  1139. This is one of the basic protocols of the TCP/IP suite.  It sits on top
  1140. of IP and is mostly used for inter-network routing.  However, it also has
  1141. a Timestamp message, which is used by several later time applications.
  1142. This message allows exchanging time in milliseconds since midnight UT.
  1143.  
  1144. (RFC778) 18 Apr 81 (Mills)       DCNet Internet Clock Service
  1145.  
  1146. An early use of the ICMP Timestamp messages of RFC792 to synchronize
  1147. clocks of machines on a more or less local network.  Superseded by RFC958.
  1148.  
  1149. (RFC867) May 83    (Postel)      Daytime Protocol
  1150.  
  1151. Allows connecting to a foreign host and receiving the time as an ASCII
  1152. character string.  Seldom implemented and little used because there is
  1153. no standard for what the character string should be (much less for what
  1154. time zone it should be in).
  1155.  
  1156.  
  1157. (RFC868) May 83    (Postel)      Time Protocol
  1158.  
  1159. The basic Internet time of day protocol for many years.  Quoting:
  1160.  
  1161.     This protocol provides a site-independent, machine readable date and
  1162.     time.  The Time service sends back to the originating source the time in
  1163.     seconds since midnight on January first 1900.
  1164.  
  1165. The choice of seconds was deliberate because this protocol was intended to
  1166. be used between systems on long-haul networks on which greater precision
  1167. would only give an illusion of accuracy.  Sometimes used in conjunction
  1168. with ICMP Timestamp messages when communicating with hosts from which
  1169. greater accuracy is available.  Best used to poll several hosts and compare
  1170. their time before setting the local host's time.
  1171.  
  1172. It may be used on top of either TCP or UDP:  UDP is better because of
  1173. lessened load on machines running the servers and because of lessened
  1174. round trip times.
  1175.  
  1176. At least four implementations of this protocol for 4.2BSD exist:
  1177.  
  1178. name    author                    anonymous ftp source
  1179.  
  1180. rdate    Sun Microsystems Incorporated        none
  1181.     Polls one host and believes it if it responds.
  1182.     Uses inetd.  Only uses TCP.
  1183.  
  1184. ndate    Christopher Kent <chris@merlin.purdue.edu> merlin.purdue.edu:dated.flar
  1185.     Tries many hosts in succession, believes the first to respond.
  1186.     Tries for accuracy by taking round trip delay into account.
  1187.     Does not use inetd.  Uses UDP.
  1188.  
  1189. nettime    Richard Johnson <raj@UCI.EDU>        uci.edu:pub/nettime.c
  1190.     Polls many hosts, even broadcasts a request over ethernet.
  1191.     Does some averaging and rejection to pick a best time.  Uses UDP.
  1192.  
  1193. netdate    John Quarterman <jsq@sally.utexas.edu> sally.utexas.edu:pub/netdate.shar
  1194.     Polls many hosts, picks the largest group with similar times,
  1195.     and believes the first of those.  (The intervals and hosts can
  1196.     be specified on the command line for various effects.)
  1197.     Uses inetd, with TCP or UDP.
  1198.  
  1199.  
  1200. (RFC956) Sep 85    (Mills)       Algorithms for Synchronizing Network Clocks  
  1201.  
  1202. Covers most of the issues involved.  Here is the first page:
  1203.  
  1204. Status of this Memo
  1205.  
  1206.    This RFC discussed clock synchronization algorithms for the
  1207.    ARPA-Internet community, and requests discussion and suggestions for
  1208.    improvements.  Distribution of this memo is unlimited.
  1209.  
  1210. Table of Contents
  1211.  
  1212.    1.      Introduction
  1213.    2.      Majority-Subset Algorithms
  1214.    3.      Clustering Algorithms
  1215.    4.      Application to Time-Synchronization Data
  1216.    5.      Summary and Conclusions
  1217.    6.      References
  1218.    Appendix
  1219.    A.      Experimental Determination of Internet Host Clock Accuracies
  1220.    A1.     UDP Time Protocol Experiment
  1221.    A2.     ICMP Timestamp Message Experiment
  1222.    A3.     Comparison of UDP and ICMP Time
  1223.  
  1224. List of Tables
  1225.  
  1226.    Table 1.  C(n,k) for n from 2 to 20
  1227.    Table 2.  Majority Subsets for n = 3,4,5
  1228.    Table 3.  Clustering Algorithm using UDP Time Protocol Data
  1229.    Table 4.  Clustering Algorithm using ICMP Timestamp Data
  1230.    Table 5.  ISI-MCON-GW Majority-Subset Algorithm
  1231.    Table 6.  ISI-MCON-GW Clustering Algorithm
  1232.    Table 7.  LL-GW (a) Majority-Subset Algorithm
  1233.    Table 8.  LL-GW (a) Clustering Algorithm
  1234.    Table 9.  LL-GW (b) Majority-Subset Algorithm
  1235.    Table 10. LL-GW (b) Clustering Algorithm
  1236.    Table A1. UDP Host Clock Offsets for Various Internet Hosts
  1237.    Table A2. UDP Offset Distribution < 9 sec
  1238.    Table A3. UDP Offset Distribution < 270 sec
  1239.    Table A4. ICMP Offset Distribution < 9 hours
  1240.    Table A5. ICMP Offset Distribution < 270 sec
  1241.    Table A6. ICMP Offset Distribution < 27 sec
  1242.    Table A7. ICMP Offset Distribution < .9 sec
  1243.    Table A8. Comparison of UDP and ICMP Host Clock Offsets
  1244.  
  1245.  
  1246. (RFC957) Sep 85    (Mills)       Experiments in Network Clock Synchronization  
  1247.  
  1248. Similar to RFC956, but more about how you get the accurate time in the
  1249. first place, before you try to distribute it over the network.
  1250. Everything you ever wanted to know about WWV and GOES clocks.
  1251.  
  1252. Table of Contents
  1253.  
  1254.    1.      Introduction
  1255.    2.      Design of the Synchronization Algorithm
  1256.    2.1.    The Logical Clock
  1257.    2.2.    Linear Phase Adjustments
  1258.    2.3.    Nonlinear Phase Adjustments
  1259.    3.      Synchronizing Network Clocks
  1260.    3.1.    Reference Clocks and Reference Hosts
  1261.    3.2.    Distribution of Timing Information
  1262.    4.      Experimental Validation of the Design
  1263.    4.1.    Experiment Design
  1264.    4.2.    Experiment Execution
  1265.    4.3.    Discussion of Results
  1266.    4.3.1.  On Power-Grid Clocks
  1267.    4.3.2.  On Clocks Synchronized via Network Links
  1268.    4.3.3.  On the Accuracy of Radio Clocks
  1269.    4.3.3.1. The Spectracom 8170 WWVB Radio Clock
  1270.    4.3.3.2. The True Time 468-DC GOES Radio Clock
  1271.    4.3.3.3. The Heath GC-1000 WWV Radio Clock
  1272.    4.3.4.  On Handling Disruptions
  1273.    4.4.    Additional Experiments
  1274.    5.      Summary and Conclusions
  1275.    6.      References
  1276.  
  1277. List of Figures
  1278.  
  1279.    Figure 1. Clock Registers
  1280.    Figure 2. Network Configuration
  1281.  
  1282.  
  1283. (RFC958) Sep 85    (Mills)       Network Time Protocol  
  1284.  
  1285. Not yet a standard but it probably will be.  At least one 4.2BSD implementation
  1286. is said to exist but I don't have access information for it offhand.
  1287. Quoting from the beginning of the RFC:
  1288.  
  1289. Status of this Memo
  1290.  
  1291.    This RFC suggests a proposed protocol for the ARPA-Internet
  1292.    community, and requests discussion and suggestions for improvements.
  1293.    Distribution of this memo is unlimited.
  1294.  
  1295. Table of Contents
  1296.  
  1297.    1.      Introduction
  1298.    2.      Service Model
  1299.    3.      Protocol Overview
  1300.    4.      State Variables and Formats
  1301.    5.      Protocol Operation
  1302.    5.1.    Protocol Modes
  1303.    5.2.    Message Processing
  1304.    5.3.    Network Considerations
  1305.    5.4.    Leap Seconds
  1306.    6.      References
  1307.    Appendix A. UDP Header Format
  1308.    Appendix B. NTP Data Format
  1309.  
  1310. 1.  Introduction
  1311.  
  1312.    This document describes the Network Time Protocol (NTP), a protocol
  1313.    for synchronizing a set of network clocks using a set of distributed
  1314.    clients and servers.  NTP is built on the User Datagram Protocol
  1315.    (UDP) [13], which provides a connectionless transport mechanism.  It
  1316.    is evolved from the Time Protocol [7] and the ICMP Timestamp message
  1317.    [6] and is a suitable replacement for both.
  1318.  
  1319.    NTP provides the protocol mechanisms to synchronize time in principle
  1320.    to precisions in the order of nanoseconds while preserving a
  1321.    non-ambiguous date, at least for this century.  The protocol includes
  1322.    provisions to specify the precision and estimated error of the local
  1323.    clock and the characteristics of the reference clock to which it may
  1324.    be synchronized.  However, the protocol itself specifies only the
  1325.    data representation and message formats and does not specify the
  1326.    synchronizing algorithms or filtering mechanisms.
  1327.  
  1328.  
  1329. TSP: The Time Synchronization Protocol for UNIX 4.3BSD, R. Gusella and S. Zatti
  1330.  
  1331. I've not been able to locate a copy of this paper.  But it's a method
  1332. of using ICMP Timestamp messages to synchronize the clocks of machines
  1333. on a local area network to a high degree of accuracy.  Time is always
  1334. monotonic on all the machines:  adjustments are done by slowing or
  1335. speeding the clocks; never by running them backwards.  Does not address
  1336. the problem of how you get the original time, but that can be dealt
  1337. with by using a radio clock or getting the original time over a network
  1338. from some machine which has one.
  1339.  
  1340. Volume-Number: Volume 5, Number 17
  1341.  
  1342. From jsq  Sun Jan 12 14:40:56 1986
  1343. From: std-unix%ut-sally.UUCP@SALLY.UTEXAS.EDU (Moderator, John Quarterman)
  1344. Newsgroups: mod.std.unix
  1345. Subject: P1003 meeting in Denver and mod.std.unix
  1346. Message-Id: <3978@ut-sally.UUCP>
  1347. Organization: IEEE/P1003 Portable Operating System Environment Committee
  1348. Date: 12 Jan 86 20:40:44 GMT
  1349. Draft-9:
  1350.  
  1351. There is a P1003 meeting this week in Denver, followed by USENIX.
  1352. The moderator will be there and not here, so if you don't see
  1353. any submissions you send get posted this week, don't get upset:
  1354. I will work through any backlog when I return.
  1355.  
  1356. Volume-Number: Volume 5, Number 18
  1357.  
  1358. From jsq  Sat Jan 18 17:36:18 1986
  1359. From: std-unix%ut-sally.UUCP@SALLY.UTEXAS.EDU (Moderator, John Quarterman)
  1360. Newsgroups: mod.std.unix
  1361. Subject: How does Saudi Arabia handle time zones?
  1362. Message-Id: <4012@ut-sally.UUCP>
  1363. Reply-To: mark@cbpavo.cbosgd.ATT.UUCP
  1364. Organization: IEEE/P1003 Portable Operating System Environment Committee
  1365. Date: 18 Jan 86 23:35:59 GMT
  1366. Draft-9: TZ
  1367.  
  1368. Date: Tue, 14 Jan 86 12:04:40 est
  1369. >From: seismo!cbpavo.cbosgd.ATT.UUCP!mark@sally.UTEXAS.EDU (Mark Horton)
  1370.  
  1371. In the context of standardizing the handling of time zones for UNIX,
  1372. the question has arisen: is a timezone offset in minutes good enough,
  1373. or does someone need to be able to say "We're at 2 hours, 14 minutes,
  1374. and 23 seconds east of GMT"?
  1375.  
  1376. I've noticed that most places in the world are on standard
  1377. time, and the offsets are either whole hours or half hours.
  1378. However, I understand that Saudi Arabia is on "solar time",
  1379. which I take it means that the time zone is based on the
  1380. exact position of the sun for each town.  I also understand
  1381. that there may be other countries that don't use standard time.
  1382.  
  1383. I'd appreciate a note from anyone who is familiar with the time
  1384. zone customs of such countries.  What I'd like to know is:
  1385.  
  1386. (1) Are offsets always to the nearest minute, or are they sometimes
  1387. done to the nearest second?
  1388.  
  1389. (2) Are any means taken to compensate for the fact that the Sun is
  1390. sometimes up to 8 minutes fast or slow?  That is, does the clock run
  1391. faster or slower at certain times of the year?
  1392.  
  1393. (3) How accurate are times?  In official places (such as telephone
  1394. companies, airports) that make real use of clocks, are clocks expected
  1395. to be correct right down to the second, or are errors of a minute or
  1396. so typical?  (Even in the USA, people's wristwatches and wall clocks
  1397. are usually off by a few minutes, but computers can now synchronize
  1398. their clocks to WWV.)
  1399.  
  1400. (4) How important is the accuracy of the time?  Is it a major religious
  1401. ritual to have the time accurate down to the millisecond, or does somebody
  1402. just set the clock from a sundial and hope it's within 10 minutes?
  1403.  
  1404. Thanks in advance for replies.  I'll summarize later to mod.std.unix.
  1405.  
  1406.     Mark Horton
  1407.  
  1408. Volume-Number: Volume 5, Number 19
  1409.  
  1410. From jsq  Tue Jan 21 11:46:56 1986
  1411. From: std-unix%ut-sally.UUCP@SALLY.UTEXAS.EDU (Moderator, John Quarterman)
  1412. Newsgroups: mod.std.unix
  1413. Subject: Re: ARPA Internet Time Protocols
  1414. Message-Id: <4023@ut-sally.UUCP>
  1415. References: <3976@ut-sally.UUCP> <3977@ut-sally.UUCP>
  1416. Organization: IEEE/P1003 Portable Operating System Environment Committee
  1417. Date: 21 Jan 86 17:46:41 GMT
  1418. Draft-9: TERM TZ
  1419.  
  1420. >A wheel that frequently gets reinvented is how to tell the time over networks.
  1421. >Much work has been done on this subject in the ARPA Internet from back when
  1422. >there was only the ARPANET up to a few months ago.  This article is a brief
  1423. >summary of the existing methods.
  1424.  
  1425. I've gotten more than half a dozen requests to post the time RFCs
  1426. to mod.sources and no requests not to, so I will do so soon.
  1427.  
  1428. Volume-Number: Volume 5, Number 20a
  1429.  
  1430. >From jsq  Wed Jan 22 16:25:52 1986
  1431. From: std-unix%ut-sally.UUCP@SALLY.UTEXAS.EDU (Moderator, John Quarterman)
  1432. Newsgroups: mod.std.unix
  1433. Subject: Re: TZ and TERM per process
  1434. Message-Id: <4029@ut-sally.UUCP>
  1435. Organization: IEEE/P1003 Portable Operating System Environment Committee
  1436. Date: 22 Jan 86 22:25:10 GMT
  1437. Apparently-To: std-unix-archive
  1438.  
  1439. [ I don't know if the following suggestion really solves the
  1440. problems, but I don't believe anybody has made it before.  -mod ]
  1441.  
  1442. From: seismo!philabs!nyit!rick@sally.UTEXAS.EDU (Rick Ace)
  1443. Date: Tue, 21 Jan 86 15:51:31 est
  1444.  
  1445. Objections to keeping TZ as a UNIX environment object can be
  1446. answered by putting the timezone information (to whatever
  1447. degree of precision is necessary) in the per-process context
  1448. maintained by UNIX, also called the `u.' area.  The kernel
  1449. can offer system calls to query or change the TZ of the
  1450. calling process.  Upon fork(), the child inherits its
  1451. parent's TZ.
  1452.  
  1453. The umask(2) syscall provides a precedent for carrying
  1454. special OS-related information in the per-process context
  1455. maintained by the kernel.  I'm tempted to propose that TERM
  1456. information should be kept there too.
  1457. -----
  1458. Rick Ace
  1459. Computer Graphics Laboratory
  1460. New York Institute of Technology
  1461. Old Westbury, NY  11568
  1462. (516) 686-7644
  1463.  
  1464. {decvax,seismo}!philabs!nyit!rick
  1465.  
  1466. Volume-Number: Volume 5, Number 20b
  1467.  
  1468. From jsq  Fri Jan 24 11:13:39 1986
  1469. From: jsq (John Quarterman)
  1470. >From: std-unix%ut-sally.UUCP@SALLY.UTEXAS.EDU (Moderator, John Quarterman)
  1471. Newsgroups: mod.std.unix
  1472. Subject: Re: TZ and TERM per process
  1473. Message-Id: <4032@ut-sally.UUCP>
  1474. References: <4029@ut-sally.UUCP>
  1475. Organization: IEEE/P1003 Portable Operating System Environment Committee
  1476. Date: 23 Jan 86 18:33:36 GMT
  1477. Draft-9: TERM TZ
  1478.  
  1479. >From: pyramid!sun!guy@sally.UTEXAS.EDU (Guy Harris)
  1480. Date: Wed, 22 Jan 86 22:02:59 PST
  1481.  
  1482. > Objections to keeping TZ as a UNIX environment object can be
  1483. > answered by putting the timezone information (to whatever
  1484. > degree of precision is necessary) in the per-process context
  1485. > maintained by UNIX, also called the `u.' area. ...
  1486. > The umask(2) syscall provides a precedent for carrying
  1487. > special OS-related information in the per-process context
  1488. > maintained by the kernel.  I'm tempted to propose that TERM
  1489. > information should be kept there too.
  1490.  
  1491. This dates back to PWB/UNIX; they wanted to store some per-process
  1492. information (namely, the login name, since PWB/UNIX was originally V6-based
  1493. and, given a limit of 256 user IDs, required several people to share a user
  1494. ID) and they did so in the u-area.  However, when PWB became V7ized, they
  1495. stored it - in the environment.
  1496.  
  1497. What benefits accrue from storing this information (timezone or terminal
  1498. type) in the u-area instead of in the environment?  This proposal implies
  1499. that the information isn't protected, since there would be system calls to
  1500. change it, so that's not one of the benefits.  (It has been argued that
  1501. terminal type information should be stored with the *terminal*, and not with
  1502. the process, so it's not clear that the u-area *or* the environment is the
  1503. proper place for this.)  The reason the umask was stored in the u-area is
  1504. probably so that programs didn't have to change to be affected by the umask;
  1505. in order for it to work with "open", it had to be accessible to the kernel,
  1506. and the most logical place for variables like that is the u-area.
  1507.  
  1508. The main objections I've seen to storing the time zone in the environment
  1509. are that it is subject to forgery and that there's no way to set TZ for
  1510. *every* process on the system (and even for those processes where you *can*
  1511. set it, current S3/S5 requires you to set it independently in several
  1512. places).  If the time zone information is moved from the user-mode
  1513. per-process data segment to the kernel-mode per-process data segment, this
  1514. doesn't solve the problem of forgery unless the system call to set it is
  1515. privileged (in which case it isn't really settable by most processes, so why
  1516. is it a per-user item?) and doesn't solve the problem of setting it
  1517. initially.
  1518.  
  1519. The best solution to both of those problems I originally saw in an article
  1520. about mixing V7 and S3 compatibility in Xenix.  Microsoft kept the old V7
  1521. "ftime" call, which gets the time zone information from the kernel (which is
  1522. set at system build time, or if you have something like an EEPROM on your
  1523. machine it can be set at boot time; there is no unprivileged system call to
  1524. set it, so it's unforgeable), and had "ctime" fetch the time zone
  1525. information from the kernel if there was no TZ environment variable.
  1526.  
  1527. This solves the problem of setting it initially, as the default setting is
  1528. what most programs would want to use; if a user dials in from another time
  1529. zone, the program they run as their shell will have to provide some way for
  1530. them to set TZ.  It also solves the problem of forgery, assuming the S5
  1531. "putenv" function is present.  Have "ctime" (or anybody else) use the
  1532. kernel's timezone value if TZ is present but has a null string as a value,
  1533. and have programs that want to be guaranteed to get the "official" time zone,
  1534. like "uucico", just do 'putenv("TZ=");' and wipe out the supplied time zone.
  1535.  
  1536. Volume-Number: Volume 5, Number 21
  1537.  
  1538.  
  1539. From jsq  Fri Jan 24 11:19:31 1986
  1540. From: std-unix%ut-sally.UUCP@SALLY.UTEXAS.EDU (Moderator, John Quarterman)
  1541. Newsgroups: mod.std.unix
  1542. Subject: Re: TZ and TERM per process
  1543. Message-Id: <4034@ut-sally.UUCP>
  1544. References: <4029@ut-sally.UUCP>
  1545. Organization: IEEE/P1003 Portable Operating System Environment Committee
  1546. Date: 24 Jan 86 17:19:09 GMT
  1547. Draft-9: TERM TZ
  1548.  
  1549. >From: decwrl!mips!mash@pyramid.UUCP (John Mashey)
  1550. Date: Fri, 24 Jan 86 01:22:08 pst
  1551.  
  1552. It was recently suggested here to make TZ & TERM into u_area variables,
  1553. with special system calls to tweak them, using umask(2) as precedent.
  1554. 1) Please don't, at least not without much more thought.
  1555. 2) Doing umask(2) that way was perhaps a mistake.
  1556.  
  1557. Let me shed some light on the history of these things, first recalling
  1558. some philosophy that UNIXers are supposed to hold dear:
  1559.  
  1560. Nothing goes in the kernel unless it MUST.
  1561. Don't add system calls unless you MUST.
  1562. Don't add per-process state, unless:
  1563.     a) The kernel needs convenient/efficient access to it.
  1564.     OR
  1565.     b) It must be there for protection.
  1566.  
  1567. Way back, PWB/UNIX added 3 per-process data items, which were given
  1568. shell variable names.  This was done only after great agonizing.
  1569. PWB also changed file creation modes (manually) everywhere to
  1570. avoid creating 0666 files; this was not elegant.
  1571.  
  1572. It was absolutely clear that it was NOT a good idea to keep adding
  1573. piecemeal data items to the u-area to cover every single thing
  1574. that people wanted, adding new system calls to get/set each value.
  1575. By this time [1977], there were all sorts of (different) extra such
  1576. goodies tucked away in different UNIX variants, and this was not good.
  1577.  
  1578. Hence, the environment feature was designed into V7 as a general
  1579. mechanism to cover all miscellaneous data, such that:
  1580.     a) the kernel never needed to access the data items directly.
  1581.     b) Users who wanted big environments could pay for them,
  1582.     without penalizing everybody by making the u_area qutie large,
  1583.     or by having extra storage mechanisms.  Note: when this was
  1584.     done, it was noted that there was "the possibility for untasteful
  1585.     expansion of the enviroonment", and this has indeed come to pass,
  1586.     as one sees multi-KB-size environments floating around.
  1587.     c) No extra system calls were needed.
  1588.     d) No protection mechanisms were needed or desired [we designed
  1589.     a horde of variants that had the environment as a kernel-protected
  1590.     list of name-value-protection tuples; every single one of them
  1591.     was ugly, expensive, incomprehensible, or a combination.]
  1592.     e) System call interface routines could, as needed, interrogate
  1593.     environment variables as needed to provide useful behavior;
  1594.     these was deemed greatly preferable to having the variable
  1595.     knowledge get wired into the kernel.  [example execvp & friends].
  1596.     This was especially true when the semantics might want to change,
  1597.     as was the case in figuring out how to use $TERM early on.
  1598.  
  1599. In some sense, doing umask the way we did was a mistake, since the user
  1600. can change it at will, and it could have been implemented via an environment
  1601. variable, with appropriate changes to creat.  If I had it to do over,
  1602. I'd be strongly tempted to do it this way, although it adds code to
  1603. creat(), and the reasonably efficient code wants
  1604. to look at the environment once, and cache the initial value.
  1605. This has some funny semantics, but could probably be tolerated.
  1606. In any case, umask seemed simple enough, and people were, as I recall,
  1607. generally thinking that it was tied closely enough to file protection that
  1608. it was worthwhile, so it was put in this way.
  1609.  
  1610. In summary, I again plead with people to seek solutions that avoid 
  1611. piecewise additions of u_area state and system calls.  If something
  1612. important cannot be done any other way, there is good justification
  1613. for doing it.  Otherwise, one is just adding to the overgrowth in there,
  1614. rather than helping keep it pruned.
  1615.  
  1616. [ I always thought that umask should have been per-directory, not per-process.
  1617. In 4.2BSD the group of a new file is that of its parent directory.  If umask
  1618. worked similarly, I wouldn't have to be always reminding people to use umask
  1619. before working on sources.  -mod ]
  1620.  
  1621. Volume-Number: Volume 5, Number 22
  1622.  
  1623. From jsq  Tue Jan 28 11:28:03 1986
  1624. From: std-unix%ut-sally.UUCP@SALLY.UTEXAS.EDU (Moderator, John Quarterman)
  1625. Newsgroups: mod.std.unix
  1626. Subject: Re: TZ and TERM per process
  1627. Message-Id: <4060@ut-sally.UUCP>
  1628. References: <4034@ut-sally.UUCP> <4029@ut-sally.UUCP>
  1629. Organization: IEEE/P1003 Portable Operating System Environment Committee
  1630. Date: 28 Jan 86 17:27:50 GMT
  1631. Draft-9: TERM TZ
  1632.  
  1633. From: mcnc!duke!rrt@seismo.UUCP (Russ Tuck)
  1634. Date: Mon, 27 Jan 86 09:18:42 est
  1635. Organization: Duke University, Durham NC
  1636.  
  1637. I heartily agree that umask should be per-directory rather than per-process.
  1638. This is more natural and useful, allowing related files to be given the same
  1639. protection automatically as they are created in a directory.  
  1640.  
  1641. What obstacles are there to putting this behavior in Unix, and to allowing it
  1642. in the standard?
  1643.  
  1644.                 Russ Tuck
  1645.                 rrt%duke.csnet@csnet-relay
  1646.                 {ihnp4,decvax,mcnc}!duke!rrt
  1647.  
  1648. Volume-Number: Volume 5, Number 23
  1649.  
  1650. From jsq  Thu Jan 30 09:38:40 1986
  1651. From: std-unix%ut-sally.UUCP@SALLY.UTEXAS.EDU (Moderator, John Quarterman)
  1652. Newsgroups: mod.std.unix
  1653. Subject: Re: TZ and TERM per process
  1654. Message-Id: <4077@ut-sally.UUCP>
  1655. References: <3961@ut-sally.UUCP> <3976@ut-sally.UUCP>
  1656. Organization: IEEE/P1003 Portable Operating System Environment Committee
  1657. Date: 30 Jan 86 15:38:10 GMT
  1658. Draft-9: TERM TZ
  1659.  
  1660. >From: floyd!opus!ka@SEISMO.CSS.GOV (Kenneth Almquist)
  1661. Date: Tue, 28 Jan 86 21:46:36 EST
  1662. Organization: Bell Labs, Holmdel, NJ
  1663.  
  1664. This article proposes a method of handling time zones which I think
  1665. meets all the requirements that have been mentioned.
  1666.  
  1667. The offset from GMT of some timezones is not an integral number of
  1668. hours, so I specify this offset in seconds.  The idea of compiling a
  1669. complete list of time zone names into ctime is utopian, so I have
  1670. included the time zone name.  Finally, the only way to deal with
  1671. daylight savings time appears to be to specify a list of time inter-
  1672. vals during which it applies.  Putting this all together, we get the
  1673. following, which should be placed in /usr/include/tz.h:
  1674.  
  1675. #define TZNAMLEN 6
  1676. #define NTZLIM 30
  1677.  
  1678. struct tzlimits {
  1679.     time_t tzl_start;        /* when daylight savings time starts */
  1680.     time_t tzl_end;            /* when it ends */
  1681. };
  1682.  
  1683. struct tz {
  1684.     time_t tz_offset;        /* offset in seconds from GMT */
  1685.     char tz_name[TZNAMLEN];        /* regular name of this time zone */
  1686.     char tz_dstname[TZNAMLEN];    /* name during daylight savings time */
  1687.     struct tzlimits tz_dst[NTZLIM];    /* intervals when DST applies */]
  1688. };
  1689.  
  1690. extern struct tz tz;
  1691.  
  1692. /* end of tz.h */
  1693.  
  1694.  
  1695. It should be possible for a user to use a time zone other than the
  1696. system time zone, but on the other hand it should be possible for
  1697. programs like uucico to be able to use the system time zone regardless
  1698. of what the user does.  Ctime should not break just because the
  1699. environment has been zapped.  To meet these requirements I propose the
  1700. routine "gettz".
  1701.  
  1702. Gettz is invoked as "Gettz(flag)".  The first call to gettz fills in
  1703. the global variable tz.  Subsequent calls to gettz have no effect.
  1704.  
  1705. Normally gettz gets the local time for the machine, but if flag is
  1706. nonzero and the environment variable TZFILE is set, gettz reads the
  1707. contents of that file specifed by TZFILE into the variable tz instead.
  1708.  
  1709. The routines ctime and localtime call gettz with an argument of 1, so
  1710. that programs normally do not need to invoke gettz directly.
  1711. Programs like uucico which want to force the system time zone to be
  1712. used should call gettz with an argument of zero prior to the first
  1713. call of localtime or ctime.
  1714.  
  1715. Gettz returns a negative value when an error occurs and zero
  1716. otherwize.  When an error occurs, gettz will attempt to set tz to the
  1717. local time zone; if that fails it will set it to GMT.
  1718.  
  1719. For the benefit of users, the directory /usr/lib/tz contains files
  1720. specifying all the common timezones.  The user can also create his own
  1721. private timezone files using the utility maketz.  (These files cannot
  1722. be created with text editors because they are binary files.)  The
  1723. local time zone is linked to /usr/lib/tz/local.  Most versions of the
  1724. operating system will copy this file into the kernel at system boot
  1725. time and provide a system call to fetch the local time zone which will
  1726. be used by gettz, but this is not required.  (The last sentence is for
  1727. the benefit of very small machines that might find storing the time
  1728. zone in the kernel to be too costly; I may be worrying too much here.)
  1729.  
  1730. Any problems with this?  The main one is that distant times will not
  1731. be represented in daylight savings time; I don't think that this is a
  1732. problem because times before Jan 1, 1970 cannot be represented anyway,
  1733. and it is a matter for speculation what the daylight savings time rule
  1734. will be in the year 2000.
  1735.                 Kenneth Almquist
  1736.                 ihnp4!houxm!hropus!ka    (official name)
  1737.                 ihnp4!opus!ka        (shorter path)
  1738.  
  1739. Volume-Number: Volume 5, Number 24
  1740.  
  1741. From jsq  Fri Jan 31 14:06:58 1986
  1742. From: std-unix%ut-sally.UUCP@SALLY.UTEXAS.EDU (Moderator, John Quarterman)
  1743. Newsgroups: mod.std.unix
  1744. Subject: umask per directory?
  1745. Message-Id: <4083@ut-sally.UUCP>
  1746. References: <4034@ut-sally.UUCP> <4029@ut-sally.UUCP> <4060@ut-sally.UUCP>
  1747. Reply-To: msb@lsuc.UUCP (Mark Brader)
  1748. Organization: IEEE/P1003 Portable Operating System Environment Committee
  1749. Summary: No.
  1750. Date: 31 Jan 86 20:06:44 GMT
  1751. Draft-9: 5.1 5.3.3
  1752.  
  1753. Date: Fri, 31 Jan 86 13:19:46 cst
  1754. >From: ihnp4!utzoo!lsuc!msb (Mark Brader)
  1755. Organization: Law Society of Upper Canada, Toronto
  1756.  
  1757. > From: mcnc!duke!rrt@seismo.UUCP (Russ Tuck)
  1758. > Subject: Re: TZ and TERM per process
  1759. (May I remind the moderator to watch out for inappropriate Subjects?)
  1760. [ You're right:  I missed that one.  -mod ]
  1761.  
  1762. > I heartily agree that umask should be per-directory rather than per-process.
  1763. > This is more natural and useful, allowing related files to be given the same
  1764. > protection automatically as they are created in a directory.  
  1765.  
  1766. And I heartily DISAGREE.  My umask is 022, and when I create a file
  1767. whose mode is not 644 or 755, it is a rare and earthshaking event.
  1768. Seems to me that if I was a secretive umask 077 type, or a permissive
  1769. umask 0 type, I'd feel exactly the same way.  Directories with booby
  1770. traps are the mark of VMS, not UNIX.
  1771.  
  1772. [ The moderator reminds the posters that attacks on ideas as being
  1773. appropriate to a given operating system don't add much to the discussion.
  1774. Furthermore, if you set the umask on your home directory to 022,
  1775. and that were inherited through your directory subtree, you would
  1776. get the same effect for your files as with a per-process umask.
  1777.  
  1778. I'd be really interested in any comments from John Mashey as
  1779. to what arguments arose concerning this idea when the per-process
  1780. umask was decided upon.  -mod ]
  1781.  
  1782.          { decvax | ihnp4 | watmath | ... } !utzoo!lsuc!msb
  1783.             also via { hplabs | amd | ... } !pesnta!lsuc!msb
  1784. Mark Brader        and           uw-beaver!utcsri!lsuc!msb
  1785.  
  1786. Volume-Number: Volume 5, Number 25
  1787.  
  1788. From jsq  Sat Feb  1 18:21:08 1986
  1789. From: std-unix%ut-sally.UUCP@SALLY.UTEXAS.EDU (Moderator, John Quarterman)
  1790. Newsgroups: mod.std.unix
  1791. Subject: Re: TZ and TERM per process
  1792. Message-Id: <4093@ut-sally.UUCP>
  1793. References: <4077@ut-sally.UUCP> <3961@ut-sally.UUCP> <3976@ut-sally.UUCP>
  1794. Organization: IEEE/P1003 Portable Operating System Environment Committee
  1795. Date: 2 Feb 86 00:20:37 GMT
  1796. Draft-9: TERM TZ
  1797.  
  1798. Date:    Fri, 31 Jan 86 22:48:27 PST
  1799. From: UCLA Computer Club <cc1@LOCUS.UCLA.EDU>
  1800.  
  1801. But with this proposal, what about the past timezone changes? The DST rules
  1802. have changed in the past. As it is, this routine will never say a past time
  1803. was DST.
  1804.             Michael Gersten
  1805. -- 
  1806. disclaimer | From out on the disk there arose such a platter | Michael Gersten
  1807.  
  1808. Volume-Number: Volume 5, Number 26
  1809.  
  1810. From jsq  Sat Feb  1 18:24:14 1986
  1811. From: std-unix%ut-sally.UUCP@SALLY.UTEXAS.EDU (Moderator, John Quarterman)
  1812. Newsgroups: mod.std.unix
  1813. Subject: Re: TZ and TERM per process
  1814. Message-Id: <4094@ut-sally.UUCP>
  1815. Organization: IEEE/P1003 Portable Operating System Environment Committee
  1816. Date: 2 Feb 86 00:23:34 GMT
  1817. Draft-9: TERM TZ
  1818.  
  1819. >From: ihnp4!mecc!sewilco (Scot E. Wilcoxon)
  1820. Date: Sat Feb  1 15:52:38 1986
  1821.  
  1822. U.S. Congress is concerned about election projections affecting
  1823. the results of some elections.  One of the people working on
  1824. legislation to close polls at the same time across the
  1825. nation was being interviews on NPR this week.
  1826.  
  1827. Because of the four-hour time zone difference across the continent,
  1828. the current proposal includes extending Daylight Savings Time
  1829. only in the west and only during (Presidential?) election years.
  1830.  
  1831. This proposal highlights the need for a very flexible time algorithm.
  1832. Before this, I certainly hadn't thought of election year as a
  1833. factor to consider.
  1834.  
  1835. (Observations about computerized forecasting affecting computerized
  1836. time probably belong in another group.)
  1837. --
  1838.  
  1839. Scot E. Wilcoxon  Minn. Ed. Comp. Corp.            quest!mecc!sewilco
  1840. 45 03 N / 93 15 W   (612)481-3507 {ihnp4,mgnetp}!dicomed!mecc!sewilco
  1841.  
  1842. Volume-Number: Volume 5, Number 27
  1843.  
  1844. From jsq  Mon Feb  3 10:30:22 1986
  1845. From: std-unix%ut-sally.UUCP@SALLY.UTEXAS.EDU (Moderator, John Quarterman)
  1846. Newsgroups: mod.std.unix
  1847. Subject: Re: TZ and TERM per process
  1848. Message-Id: <4100@ut-sally.UUCP>
  1849. References: <4077@ut-sally.UUCP> <3961@ut-sally.UUCP> <3976@ut-sally.UUCP>
  1850. Organization: IEEE/P1003 Portable Operating System Environment Committee
  1851. Date: 3 Feb 86 16:29:59 GMT
  1852. Draft-9: TERM TZ
  1853.  
  1854. >From: pyramid!pyrcorp!ncr-sd!greg
  1855. Date: Sat, 1 Feb 86 22:45:20 pst
  1856. Subject: Re: TZ and TERM per process
  1857. Organization: NCR Corporation, Rancho Bernardo
  1858.  
  1859. >>From: floyd!opus!ka@SEISMO.CSS.GOV (Kenneth Almquist)
  1860. >Date: Tue, 28 Jan 86 21:46:36 EST
  1861. >Organization: Bell Labs, Holmdel, NJ
  1862. >
  1863. >This article proposes a method of handling time zones which I think
  1864. >meets all the requirements that have been mentioned.
  1865. >
  1866. > [ a scheme where timezone information is kept in a binary table
  1867. >   and read in upon demand.  Also includes a clever technique for
  1868. >   allowing users to use non-local timezones while permiting system
  1869. >   programs to still run in local time. ]
  1870. >
  1871. >Any problems with this?
  1872.  
  1873. An interesting idea; I'd like to see it explored further.  The impact
  1874. would not seem to be great, there are minimal changes to existing code,
  1875. it allows flexibility in the choice of timezone, and it has a system-wide
  1876. default that isn't compiled in.
  1877.  
  1878. There's one change I would suggest: the offset for each daylight savings
  1879. time should be specified independently; sometimes the clock shift is
  1880. not exactly one hour -- there are some areas with double daylight
  1881. savings (two hours different), for example.  The name of the zone may
  1882. have to be specified, as well.  Perhaps a better way would be to have
  1883. some entries that compactly represent the usual case (one hour offset,
  1884. standard name) and then have some provision for non-standard offsets
  1885. and names.
  1886. -- 
  1887. -- Greg Noel, NCR Rancho Bernardo    Greg@ncr-sd.UUCP or Greg@nosc.ARPA
  1888.  
  1889. Volume-Number: Volume 5, Number 28
  1890.  
  1891. From jsq  Mon Feb  3 11:57:41 1986
  1892. From: std-unix%ut-sally.UUCP@SALLY.UTEXAS.EDU (Moderator, John Quarterman)
  1893. Newsgroups: mod.std.unix
  1894. Subject: Re: umask per dir
  1895. Message-Id: <4102@ut-sally.UUCP>
  1896. Organization: IEEE/P1003 Portable Operating System Environment Committee
  1897. Date: 3 Feb 86 17:57:20 GMT
  1898. Draft-9: 5.1 5.3.3
  1899.  
  1900. >From seismo!gatech!astrovax!fisher!djl Mon Feb  3 11:28:40 1986
  1901. Date: Mon, 3 Feb 86 02:00:12 est
  1902.  
  1903. As a big fan of least common denominator, rather than feeping creaturism,
  1904. I would note that it is quite easy to get umask/dir, by simply using
  1905. the facilities provided by your shell.  For instance, using csh,
  1906. alias cd to do 'source .exitdir; cd \!* ; source .enterdir' , and
  1907. use the shell scripts called .enterdir and .exitdir to do directory
  1908. specific initializations.
  1909.  
  1910.             ***dan
  1911.  
  1912. [ Since I'm taking sides on this, I'm going to post my comments
  1913. as a followup by jsq instead of notes by the moderator.  -mod ]
  1914.  
  1915. {allegra,astrovax,princeton}!fisher!djl
  1916. The misplaced (That car sure is rusty!) Californian
  1917.  
  1918. Volume-Number: Volume 5, Number 29
  1919.  
  1920. From jsq  Mon Feb  3 12:38:56 1986
  1921. From: std-unix%ut-sally.UUCP@SALLY.UTEXAS.EDU (Moderator, John Quarterman)
  1922. Newsgroups: mod.std.unix
  1923. Subject: Re: umask per dir
  1924. Message-Id: <4103@ut-sally.UUCP>
  1925. Organization: IEEE/P1003 Portable Operating System Environment Committee
  1926. Date: 3 Feb 86 18:07:35 GMT
  1927. Draft-9: 5.1 5.3.3
  1928.  
  1929. >From: jsq@sally.utexas.edu (John Quarterman)
  1930. Date: Mon, 3 Feb 1986 12:00:13 CST
  1931.  
  1932. > As a big fan of least common denominator, rather than feeping creaturism,
  1933. > I would note that it is quite easy to get umask/dir, by simply using
  1934. > the facilities provided by your shell.  For instance, using csh,
  1935. > alias cd to do 'source .exitdir; cd \!* ; source .enterdir' , and
  1936. > use the shell scripts called .enterdir and .exitdir to do directory
  1937. > specific initializations.
  1938. >             ***dan
  1939.  
  1940. To set up a source tree so that everybody used the same umask on it
  1941. with your method would require everybody to change their .cshrc.
  1942. To do it with real umask per directory would require only setting
  1943. the umask for the directory.  The latter looks more like the least
  1944. common denominator to me.
  1945.  
  1946. The more interesting question is *how* do you set a umask on a
  1947. directory?  Do you try to derive the bits from the directory mode
  1948. bits in some way, such as setgid means apply the group mode bits
  1949. as the mask?  Or do you have to have an extra word in the inode?
  1950. Or do you do it by a file in the directory?  And how do you get
  1951. the umask inherited by child directories?
  1952.  
  1953. I would think the preferred approach would be to somehow derive
  1954. the umask from the directory mode bits.  Inheriting could be done
  1955. by just setting the umask for all the subdirectories with find.
  1956. Except that mkdir should likely make sure the umask were inherited.
  1957.  
  1958. One wonders if most of the people for umask per directory are using
  1959. 4.2BSD or 4.3BSD and those against are using other systems.
  1960. The desirability becomes obvious after you get used to the 4.2BSD
  1961. method of assigning the group of a new file according to the group
  1962. of its parent directory.
  1963.  
  1964. Volume-Number: Volume 5, Number 30
  1965.  
  1966. From jsq  Mon Feb  3 15:10:38 1986
  1967. From: std-unix%ut-sally.UUCP@SALLY.UTEXAS.EDU (Moderator, John Quarterman)
  1968. Newsgroups: mod.std.unix
  1969. Subject: Re: TZ and TERM per process (really environments and setuid scripts)
  1970. Message-Id: <4106@ut-sally.UUCP>
  1971. References: <4029@ut-sally.UUCP>
  1972. Organization: IEEE/P1003 Portable Operating System Environment Committee
  1973. Date: 3 Feb 86 21:10:14 GMT
  1974. Draft-9: TERM TZ
  1975.  
  1976. From: harvard!mit-eddie!frog!rfm (Bob Mabee)
  1977. Date: Sun, 2 Feb 86 20:56:51 est
  1978. Organization: Charles River Data Systems, Framingham MA
  1979.  
  1980. Several posters have mentioned that a setuid program or shell script can be
  1981. compromised by suitably altering the environment list.  This is a nasty
  1982. problem because tools (the shell, library functions) are likely to develop
  1983. new dependencies on the environment as new functionality is added, and we
  1984. are not likely to think of all the possible attacks.
  1985.  
  1986. I suggest that the kernel should close this hole once and for all, by clearing
  1987. the environment at the point in exec() where it implements the SETUID mode.
  1988.  
  1989. Some programs operate incorrectly when invoked from single-user mode, or the
  1990. startup scripts, or cron, because the environment is deficient.  For example,
  1991. the time zone is likely to revert to EST.  This change forces at least the
  1992. SETUID programs to be tested (implies debugged) under such conditions.
  1993. Obviously, the time zone should default to something inappropriate for the
  1994. development site, so you notice during testing.
  1995.  
  1996. Instead of clearing the environment, exec() could substitute a canonical
  1997. administrative environment, from a kernel holding area or from a file.
  1998. Note that exec() is in a good position to fetch arbitrary files - it uses
  1999. high-level kernel facilities just like a user program.
  2000.  
  2001.                 Bob Mabee @ Charles River Data Systems
  2002.                 decvax!frog!rfm
  2003.  
  2004. Volume-Number: Volume 5, Number 31
  2005.  
  2006. From jsq  Mon Feb  3 15:16:02 1986
  2007. From: std-unix%ut-sally.UUCP@SALLY.UTEXAS.EDU (Moderator, John Quarterman)
  2008. Newsgroups: mod.std.unix
  2009. Subject: Re: umask per directory?
  2010. Message-Id: <4107@ut-sally.UUCP>
  2011. References: <4034@ut-sally.UUCP> <4029@ut-sally.UUCP> <4060@ut-sally.UUCP> <4083@ut-sally.UUCP>
  2012. Organization: IEEE/P1003 Portable Operating System Environment Committee
  2013. Date: 3 Feb 86 21:15:35 GMT
  2014. Draft-9: 5.1 5.3.3
  2015.  
  2016. Date: 2 Feb 86 21:02:09 EST (Sun)
  2017. >From: floyd!opus!ka@SEISMO.CSS.GOV ()
  2018. Organization: Bell Labs, Holmdel, NJ
  2019.  
  2020. I agree with Mark Brader.  In response to the moderator's suggestion
  2021. that "if you set the umask on your home directory to 022, and that were
  2022. inherited through your directory subtree, you would get the same effect
  2023. for your files as with a per-process umask," I would point out that
  2024. this doesn't work for files in /tmp.
  2025.  
  2026. [ Good point.  Assume the old per-process umask still exists as a default,
  2027. though.  (I've been assuming that but haven't mentioned it.)  If /tmp
  2028. has no directory umask, things work.  Most of the other objections
  2029. are also accounted for.  -mod ]
  2030.  
  2031. My major objection, though, is that the proposal would break existing
  2032. programs.  For example, tar and cpio would have to be modified to
  2033. handle the per-directory umask.  This would mean new tar and cpio tape
  2034. formats, which would probably be unreadable by existing versions of tar
  2035. and cpio.  I wrote a version of rcp a couple of months ago which would
  2036. have to be changed.  Programs as unlikely as ed and passwd would
  2037. require modification.
  2038.  
  2039. In my view, the benefits of going to per-directory umasks are
  2040. outweighed by the disadvantages.  I might be convinced otherwise with
  2041. additional argument.  But changes which are not backwards compatible
  2042. must be justified by *major* benefits.
  2043.                 Kenneth Almquist
  2044.                 ihnp4!houxm!hropus!ka    (official name)
  2045.                 ihnp4!opus!ka        (shorter path)
  2046.  
  2047. Volume-Number: Volume 5, Number 32
  2048.  
  2049. From jsq  Mon Feb  3 15:32:12 1986
  2050. From: std-unix%ut-sally.UUCP@SALLY.UTEXAS.EDU (Moderator, John Quarterman)
  2051. Newsgroups: mod.std.unix
  2052. Subject: umasks and P1003 in general
  2053. Message-Id: <4108@ut-sally.UUCP>
  2054. Organization: IEEE/P1003 Portable Operating System Environment Committee
  2055. Date: 3 Feb 86 21:31:52 GMT
  2056. Draft-9: 1.0 5.1 5.3.3
  2057.  
  2058. [ Comments within square brackets like this are by the poster,
  2059. unless they end with -mod, when they are by the moderator.  -mod ]
  2060.  
  2061. Date: Sun, 2 Feb 86 14:29:57 pst
  2062. >From: aps@DECWRL.DEC.COM (Armando P. Stettner)
  2063.  
  2064. Hi.
  2065. On the subject of umasks:
  2066. I feel that setting the modes of a created file according to a
  2067. per-directory umask is a bad idea.
  2068.  
  2069. On the surface, it seems like it might be a good idea.  But what this
  2070. change does is to remove some of the responsibility and choice of the
  2071. program and certain choices of the invoker to place it where such
  2072. decisions may have been (perhaps) arbitrarily made by the people who
  2073. created and/or own the target directory.  The word `arbitrary' may be
  2074. too strong a word but the point I am trying to make is that one
  2075. important characteristic of UNIX I have come to respect, appreciate,
  2076. and love is that UNIX doesn't do things one doesn't ask it to do nor
  2077. does it change or coerce things one produces (files on UNIX vs files on
  2078. VMS, as an example of the latter).  Please leave the decisions with the
  2079. programmers and the users.
  2080.  
  2081. [ The same argument would apply just as well to existing directory
  2082. protection modes or the 4.2BSD method of assigning groups to files.
  2083. However, the moderator has been sticking his oar in too often lately
  2084. and will try to be quiet.  -mod ]
  2085.  
  2086. My second objection stems from the thought that it might break a large
  2087. set of existing programs (uucp, tip, lp{r,d,rm}, data base subsystems
  2088. that run across several UNIX implementations and can not assume certain
  2089. record locking facilities, etc).  [Don't nickel and dime me with
  2090. implementation details; try and understand what I am trying to say.  I
  2091. could check the sources also.  Thanks.]
  2092.  
  2093. [ Please elaborate.  -mod ]
  2094.  
  2095. On the UNIX IEEE P1003 effort, in general:
  2096. This brings me to my next (and maybe the more important) point:  I have
  2097. been watching this news group and the standards efforts in general (the
  2098. ANSI C effort to a lessor degree).  I am concerned by what I see.  I am
  2099. afraid what is happening is sort of what people feared would happen if
  2100. a Constitutional Convention were to take place and this is: people now
  2101. have a chance to change things.  Intentions are all well and good (I
  2102. assume this).  However, things are getting changed.  What I would like
  2103. to see in a standard that is attempting to pull together a fragmented
  2104. world, such as the UNIX world, is a strong subset of the
  2105. characteristics and functions in the more common (popular?) existing
  2106. implementations; not one which is implemented by no current version.  I
  2107. don't know; maybe this is what is wanted by people on the IEEE
  2108. committee:  no current vendor has a head start ...
  2109.  
  2110. There are few good things that are done by ``committee'' that I know
  2111. of.  This does not mean that I feel that P1003 should be disbanded;
  2112. however, I feel the members should be aware of the possible pitfalls of
  2113. `by committee' design and work to avoid them.
  2114.  
  2115. [ I'm overdue for posting a report on the latest P1003 meeting and will
  2116. address this subject.  However, be aware that the newsgroup is not P1003,
  2117. and that the committee members constantly raise your concern.  -mod ]
  2118.  
  2119.  
  2120. Maybe the resulting work of P1003 should be called UNIX2 or unUNIX
  2121. (Onionix?**).
  2122.  
  2123. [Needless to say (I know: then why say it?), these opinions are mine
  2124. and not necessarily DEC's]
  2125.  
  2126.     Armando Stettner
  2127.     decwrl!aps, decvax!aps, decwse::aps, aps@berkeley
  2128.  
  2129.  
  2130. ** Onionix is a trademark of aps enterprises...
  2131.  
  2132. Volume-Number: Volume 5, Number 33
  2133.  
  2134. From jsq  Tue Feb  4 15:12:54 1986
  2135. From: std-unix%ut-sally.UUCP@SALLY.UTEXAS.EDU (Moderator, John Quarterman)
  2136. Newsgroups: mod.std.unix
  2137. Subject: per directory umask
  2138. Message-Id: <4117@ut-sally.UUCP>
  2139. Organization: IEEE/P1003 Portable Operating System Environment Committee
  2140. Date: 4 Feb 86 21:12:33 GMT
  2141. Draft-9: 5.3.3
  2142.  
  2143. Date: Tue, 4 Feb 86 07:19:30 PST
  2144. >From: mordor!lll-crg!hoptoad!laura (Laura Creighton)
  2145.  
  2146. I think that while it might have been better if umask had worked this way from
  2147. the beginning, changing existing behaviour is a bad idea.  You will burn
  2148. people who expect one behaviour and get another. 
  2149.  
  2150. I am actually not sure that it is a good idea at all.  The main reason I know
  2151. of that people want the proposal is so that they can have a varying levels of
  2152. protection and privacy without much effort.  But if they really want privacy,
  2153. then they *should* be going to the effort -- this is the whole idea.  If they
  2154. depend on the filesystem when they should be depending on themselves they are
  2155. going to get a rude surprise one day when their security is compromised.
  2156.  
  2157. I don't think that the current umask situation is broken.  Why are we trying
  2158. to fix it?
  2159.  
  2160. [ See the following article by Dan Franklin.  -mod ]
  2161.  
  2162. Laura Creighton        
  2163. ihnp4!hoptoad!laura 
  2164. hoptoad!laura@lll-crg.arpa
  2165.  
  2166. Volume-Number: Volume 5, Number 34
  2167.  
  2168. From jsq  Tue Feb  4 15:16:43 1986
  2169. From: std-unix%ut-sally.UUCP@SALLY.UTEXAS.EDU (Moderator, John Quarterman)
  2170. Newsgroups: mod.std.unix
  2171. Subject: Re: umask per dir
  2172. Message-Id: <4118@ut-sally.UUCP>
  2173. Organization: IEEE/P1003 Portable Operating System Environment Committee
  2174. Date: 4 Feb 86 21:16:28 GMT
  2175. Draft-9: 5.1 5.3.3
  2176.  
  2177. Date:     Tue, 4 Feb 86 11:04:50 EST
  2178. >From: Dan Franklin <dan@BBN-PROPHET.ARPA>
  2179.  
  2180. I have always felt that the UNIX umask "solution" to the problem of protection
  2181. was inadequate.  If I had per-directory protections, then my personal hierarchy
  2182. would be writable only by me (644), except for my mail files which would be
  2183. even more private (600).  The source hierarchy I share with others on my
  2184. project would be read-write by the group (664).  Since all we have is umask, I
  2185. can't do this.  I must set umask to 002 so that when I work on the group source
  2186. hierarchy, others can modify my modifications.  I put up with the lessened
  2187. security in other areas because most programs implement various ad-hoc
  2188. solutions--the mail system creates all its files 600, etc.  It's not perfect;
  2189. when I use a filter on a message file in one of my MH folders, the output file
  2190. is created group-read-write.  But it mostly works.
  2191.  
  2192. The cd alias is a clever suggestion, but like umask, it only mostly works.
  2193. Your shell, and the shells of all the other users you ever expect to create
  2194. files in those directories, must have aliases (thus leaving out users of the
  2195. BSD Bourne shell and the System V.1 shell) and it doesn't work with commands
  2196. like "find," which can recurse over a hierarchy and create files (via -exec)
  2197. without ever forking a shell of any kind.  Some daemons don't exec shells,
  2198. or only exec the Bourne shell (/etc/rc, for instance).
  2199.  
  2200. However, just because umask is inadequate doesn't mean this committee should
  2201. try to fix the problem.  This inadequacy is not widely enough recognized to
  2202. justify creating a brand-new scheme in a standards document without testing it.
  2203. Also, the standard would (I think) have to retain umask in its current form;
  2204. and having two ways to do the same thing is always unfortunate.  Other
  2205. submitters have also raised good points about compatibility (tar and cpio).  So
  2206. much as I like the idea, I think it has to be left for innovators to try
  2207. adding, not for a standard.
  2208.  
  2209. [ No one has proposed changing umask in a standards document.  -mod ]
  2210.  
  2211.     Dan
  2212.  
  2213. Volume-Number: Volume 5, Number 35
  2214.  
  2215. From jsq  Tue Feb  4 16:08:20 1986
  2216. From: std-unix%ut-sally.UUCP@SALLY.UTEXAS.EDU (Moderator, John Quarterman)
  2217. Newsgroups: mod.std.unix
  2218. Subject: mod.std.unix and P1003
  2219. Message-Id: <4119@ut-sally.UUCP>
  2220. Organization: IEEE/P1003 Portable Operating System Environment Committee
  2221. Date: 4 Feb 86 22:08:03 GMT
  2222. Draft-9: mod.std.unix
  2223.  
  2224. There seems to be widespread confusion as to the relation of the
  2225. newsgroup mod.std.unix (aka the mailing list STD-UNIX) and the
  2226. IEEE P1003 standards committee.  Allow me to try to clear some of it up.
  2227.  
  2228.  
  2229. Because something is discussed in mod.std.unix does not mean that
  2230. it is automatically proposed to P1003 for inclusion in the standard.
  2231. Proposals to the committee have to be more formal.  Especially they
  2232. have to include specific proposed wording.
  2233.  
  2234. As it happens, the moderator of the newsgroup is also the USENIX
  2235. representative to the committee.  As such, I am willing to present
  2236. proposals to the committee if someone actually has some to present.
  2237. However, the proposer has to specifically request that for a specific
  2238. proposal and I have to agree to it before it will happen.
  2239.  
  2240. It is true that several committee members follow the newsgroup and
  2241. that I make sure that copies of articles from the newsgroup go to
  2242. appropriate technical reviewers or are mentioned to the committee
  2243. as a whole.  However, they are not presented as proposals:  they
  2244. are presented as comments.  They may help committee members understand
  2245. the context of a topic which is treated in the standards document,
  2246. but they are unlikely to cause new topics to be added to the document.
  2247.  
  2248. This is not to say that input from the newsgroup is not useful
  2249. to the committee.  A number of problems with the latest drafts
  2250. were pointed out in the newsgroup and fixed because of that.
  2251. The time zone discussion has brought up some points which will
  2252. probably affect the eventual treatment of that subject by the
  2253. committee.
  2254.  
  2255.  
  2256. Because something is discussed in mod.std.unix does not even
  2257. necessarily mean that it has anything to do with the P1003 committee.
  2258. The directory umask discussion is an example.  No one has proposed
  2259. that the committee incorporate such a facility, and I would be
  2260. surprised if anyone did.  There were three main reasons I originally
  2261. brought the subject up:
  2262.     I've never heard any convincing arguments for why it was not
  2263.         done that way in the first place;
  2264.     Somebody might think of a way to implement it which avoided
  2265.         the tar and rcp type problems; and
  2266.     There has been so little traffic in the newsgroup lately that 
  2267.         a slightly controversial subject seemed indicated.
  2268.  
  2269.  
  2270. The committee is very aware that they should not be introducing
  2271. new facilities.  It has happened a few times.  The only one
  2272. I can think of at the moment is file locking, specifically the
  2273. mandatory locking feature of flock (which was actually introduced
  2274. by the /usr/group committee).  This is also, not coincidentally,
  2275. one of the most controversial things in the current document
  2276. (at the moment it's in an appendix), even though its proponents
  2277. only back it because they are convinced it is necessary.
  2278.  
  2279. You will find things in the draft standard document which do not
  2280. correspond to your local system, regardless of what your local system
  2281. is.  This is because in the real world there are at least two major
  2282. variants of UNIX and many minor ones.  To pick one and standardize on
  2283. it alone would be to try to outlaw all the others.  This is probably
  2284. not even possible, even if it were desirable.  The committee has chosen
  2285. instead to try to produce something which is not exactly like anything
  2286. out there but which can be implemented with relatively minor changes on
  2287. most existing systems.
  2288.  
  2289. I will post a report on the latest committee meeting soon in which
  2290. I will try to sketch how the committee actually works.
  2291.  
  2292. Ritual disclaimer:  this article is constructed of my personal opinions
  2293. and does not necessarily represent any official position of IEEE, P1003,
  2294. USENIX, /usr/group, or any other organization.
  2295.  
  2296. Volume-Number: Volume 5, Number 36
  2297.  
  2298. From jsq  Tue Feb  4 21:31:16 1986
  2299. From: std-unix%ut-sally.UUCP@SALLY.UTEXAS.EDU (Moderator, John Quarterman)
  2300. Newsgroups: mod.std.unix
  2301. Subject: Re: umask per directory?
  2302. Message-Id: <4122@ut-sally.UUCP>
  2303. References: <4034@ut-sally.UUCP> <4029@ut-sally.UUCP> <4060@ut-sally.UUCP>, <4083@ut-sally.UUCP>
  2304. Organization: IEEE/P1003 Portable Operating System Environment Committee
  2305. Date: 5 Feb 86 03:31:02 GMT
  2306. Draft-9: 5.1 5.3.3
  2307.  
  2308. Date: Sun, 2 Feb 86 23:48:32 pst
  2309. >From: ihnp4!decwrl!mips!mash (John Mashey)
  2310.  
  2311. 1] I don't believe the idea of associating uname values to directories
  2312. was ever discussed, as far as I can remember.  The whole thing really
  2313. came about because PWB/USG believed that security had to be tightened,
  2314. and Research and some others wanted to continue to run conveniennt loose
  2315. systems.  It was believed that setting a default per systems was fine,
  2316. but needed to be overridden as needed, so it it was put in to be inherited
  2317. in the same way as most other thigns, i.e., by process tree inheritance.
  2318.  
  2319. 2] I doubt whether the idea would have been considered seriously if
  2320. it had been brought up, at least if umask were the only reason for
  2321. adding the mechanism.  Why?
  2322. a) Remember that UNIX was designed by people who'd been working on
  2323. MULTICS, whose directories include considerable more protection
  2324. information.
  2325. b) However, UNIX directories are ONLY names.  There is no
  2326. system-implied state (except for the current directory itself)
  2327. implied by the current directory.  Nothing else is inherited or
  2328. modified by one's position in the file system.
  2329. c) I can't remember the reference, but I'd swear that one of the
  2330. early papers said that b) was on-purpose.
  2331. d) This doesn't mean the idea is necesarily bad, merely that I doubt
  2332. anybody would have believed that it fit with UNIX.
  2333.  
  2334. 3] [PHILOSOPHICAL HARANGUE]: kernel mechanisms should be added only
  2335. when really justified by serious need.  In particular, one should
  2336. try to make new mechanisms be general enough to cover numerous
  2337. special cases, not add special cases one by one.  In this case,
  2338. good questions to ask are:
  2339.     Is there per-process state information [either in the u-area
  2340.     or returned by doing a chdir(2)] that should be changed
  2341.     automatically when doing a chdir?  If so, can one store this
  2342.     in a file in the directory?  Are pieces of state added, deleted,
  2343.     merged, inherited, etc? 
  2344. If one can come up with a few examples, then perhaps the general
  2345. mechanism could be designed.  One could easily experiment with
  2346. this: for example, the chdir function call might be augmented
  2347. in any of many ways. It would be much more enlightening to hear
  2348. a proposal for a general mechanism, backed up by multiple examples &
  2349. illustrations of existing attempts within the systems to achieve the
  2350. effects.  [END PHILOSOPHICAL HARANGUE]
  2351.  
  2352. [ Now *that* was an article!  But I don't understand what chdir
  2353. has to do with it:  the idea is to create a new file according to
  2354. the umask of its parent directory, not of the current directory.
  2355. I.e., "cat this > there/that" should create "that" in the same
  2356. modes according to the umask of "there" regardless of what "." is.
  2357. -mod ]
  2358.  
  2359. Volume-Number: Volume 5, Number 37
  2360.  
  2361. From jsq  Thu Feb  6 06:57:19 1986
  2362. From: std-unix%ut-sally.UUCP@SALLY.UTEXAS.EDU (Moderator, John Quarterman)
  2363. Newsgroups: mod.std.unix
  2364. Subject: Re: umask per directory?
  2365. Message-Id: <4127@ut-sally.UUCP>
  2366. References: <4034@ut-sally.UUCP> <4029@ut-sally.UUCP> <4060@ut-sally.UUCP>
  2367. Reply-To: "Charles J. Antonelli" <cja%umich.uucp@CSNET-RELAY.ARPA>
  2368. Organization: IEEE/P1003 Portable Operating System Environment Committee
  2369. Date: 6 Feb 86 12:57:07 GMT
  2370. Draft-9: 5.1 5.3.3
  2371.  
  2372. Date: Tue, 4 Feb 86 14:05:09 est
  2373. >From: "Charles J. Antonelli" <cja%eecs.umich.csnet@CSNET-RELAY.ARPA>
  2374. Summary: Use an appropriate alias for `cd' [ Nope. -mod ]
  2375. Organization: University of Michigan EECS Dept.
  2376.  
  2377. I obtained the following idea from a colleague.  It can be used with csh
  2378. to achieve the desired effect.  Define the following alias:
  2379.  
  2380. alias cd 'if (-o .exit ) source .exit; chdir \!*; if (-o .enter ) source .enter'
  2381.  
  2382. Then create .enter and .exit files within the directories whose umasks
  2383. are to be controlled; the files contain the appropriate umask commands along
  2384. with anything else you wish to do whenever a directory is entered or exited.
  2385. In my case the new umask is echoed for verification.
  2386.  
  2387. The .exit file is useful mainly in those cases where only a small subset
  2388. of the directories have .enter files; if every directory has one then
  2389. .exit is not strictly necessary.
  2390.  
  2391. The alias checks for ownership to prevent possible corruption.
  2392.  
  2393. Charles J. Antonelli        Phone:  (313) 763-1563
  2394. The University of Michigan    Csnet:  cja@eecs.UMICH
  2395. 1508 East Engineering        Usenet: cja@umich.UUCP
  2396. Ann Arbor, MI   48109            ihnp4!umich!cja
  2397.  
  2398. [ This is one of several such shell initialization schemes I've
  2399. received (and the only one I'm going to post).  They all miss the
  2400. point:  a new file should be created according to the modes of its
  2401. *parent* directory, not the creating process's *current* directory.
  2402. That is, "cat this > there/that" should create "that" with the same
  2403. modes regardless of where "." is.  (If "there" has the directory umask
  2404. feature enabled.)  -mod ]
  2405.  
  2406. Volume-Number: Volume 5, Number 38
  2407.  
  2408. From jsq  Thu Feb  6 07:01:44 1986
  2409. From: std-unix%ut-sally.UUCP@SALLY.UTEXAS.EDU (Moderator, John Quarterman)
  2410. Newsgroups: mod.std.unix
  2411. Subject: Re:  Clearing environment on exec of setuid process
  2412. Message-Id: <4128@ut-sally.UUCP>
  2413. References: <4106@ut-sally.UUCP> <4029@ut-sally.UUCP>
  2414. Organization: IEEE/P1003 Portable Operating System Environment Committee
  2415. Date: 6 Feb 86 13:01:32 GMT
  2416. Draft-9: 3.1.2 4.2
  2417.  
  2418. Date: Wed, 5 Feb 86 08:12:33 pst
  2419. >From: seismo!sun!rtech!daveb (Dave Brower)
  2420. Organization: Relational Technology Inc, Alameda CA
  2421.  
  2422. At first glance I thought clearing the environment on the exec of a setuid
  2423. program might be OK, but it seems full of awkward side effects.
  2424.  
  2425. For instance, I could not have one of my favorite programs, nasty, that
  2426. runs setuid root and then execs the remainder of its arguments with
  2427. a negative nice value.  The real child process would never be able to
  2428. get a reasonable environment.
  2429.  
  2430. The answer is only to do limited operations when in setuid.  The best
  2431. way to do this would be to allow processes to painlessly shift back and
  2432. forth between their real-uid and effective-uid.  This is allowed, but
  2433. not documented on BSD, but appears not to be allowed at all on SV.
  2434. This way, you can have your one section that need to run setuid be setuid
  2435. whenver needed, while running as the real user the reset of the time.
  2436.  
  2437. Lastly, you really need to be able to set fixed priorities rather than
  2438. just nice values so things like a memory/cpu pig server process can avoid
  2439. getting bumped.  Convex did this by making nice values < -20 and > +20
  2440. be a fixed priority.  This seems quite reasonable, and lets a 'nasty'
  2441. root program set the fixed high priority.
  2442.  
  2443. -dB
  2444.  
  2445. Volume-Number: Volume 5, Number 39
  2446.  
  2447. From jsq  Thu Feb  6 07:08:39 1986
  2448. From: std-unix%ut-sally.UUCP@SALLY.UTEXAS.EDU (Moderator, John Quarterman)
  2449. Newsgroups: mod.std.unix
  2450. Subject: Re: umask per directory?
  2451. Message-Id: <4129@ut-sally.UUCP>
  2452. Organization: IEEE/P1003 Portable Operating System Environment Committee
  2453. Date: 6 Feb 86 13:08:27 GMT
  2454. Draft-9: 5.1 5.3.3
  2455.  
  2456. Date: Wed, 5 Feb 86 17:43:47 est
  2457. >From: seismo!harvard!think!mit-eddie!jbs (Jeff Siegal)
  2458.  
  2459. No one is suggesting "fixing" umask, only adding new capabilities
  2460. for those who will choose to use it.  I personally think that
  2461. allowing people to choose the way they want to do things, rather
  2462. than trying to second-guess what will be best.
  2463.  
  2464. Volume-Number: Volume 5, Number 40
  2465.  
  2466. From jsq  Thu Feb  6 07:16:14 1986
  2467. From: std-unix%ut-sally.UUCP@SALLY.UTEXAS.EDU (Moderator, John Quarterman)
  2468. Newsgroups: mod.std.unix
  2469. Subject: Re: umask per dir
  2470. Message-Id: <4130@ut-sally.UUCP>
  2471. References: <4118@ut-sally.UUCP>
  2472. Reply-To: dupuy@garfield.UUCP (Alexander Dupuy)
  2473. Organization: IEEE/P1003 Portable Operating System Environment Committee
  2474. Date: 6 Feb 86 13:15:56 GMT
  2475. Draft-9: 5.1 5.3.3
  2476.  
  2477. Date: Thu, 6 Feb 86 06:06:25 EST
  2478. >From: Alex Dupuy <dupuy%garfield@COLUMBIA.EDU>
  2479.  
  2480. Organization: Columbia University
  2481.  
  2482. In <4103@ut-sally.UUCP> std-unix@ut-sally.UUCP (John Quarterman) writes:
  2483. > The more interesting question is *how* do you set a umask on a directory?  Do
  2484. > you try to derive the bits from the directory mode bits in some way? ...  And
  2485. > how do you get the umask inherited by child directories?
  2486. > I would think the preferred approach would be to somehow derive the umask
  2487. > from the directory mode bits.  Inheriting could be done by just setting the
  2488. > umask for all the subdirectories with find.  Except that mkdir should likely
  2489. > make sure the umask were inherited.
  2490.  
  2491. Having primarily used bsd Unix for a few years, and before that, Twenex, which
  2492. has default file protections on a per-directory basis, I would agree that
  2493. keeping the protection masks in the directory tree is better than the Unix's
  2494. umask.  Still, as some have pointed out, for reasons of compatibility with tar
  2495. and cpio, adding information to the directory structures would be a mistake.
  2496. Also, switching over to a purely directory based umask would cause security
  2497. problems with existing programs expecting umask to work properly.
  2498.  
  2499. A directory/process based umask scheme which provides compatibility with the
  2500. normal Unix filesystems, and allows naive programs to operate securely (when
  2501. opening files in /tmp or /usr/tmp, say) is still possible, and would provide a
  2502. more flexible mechanism than the common directory based systems.  It might
  2503. work like this:
  2504.  
  2505.   The setuid and setgid bits in the mode of a directory would be used to
  2506.   specify which logical combination of umask and directory mode access bits
  2507.   should be used as the mask when creating files or directories.  The logical
  2508.   combinations would be
  2509.  
  2510.     00 mask = umask
  2511.     01 mask = umask | ~directory mode
  2512.     10 mask = umask & ~directory mode
  2513.     11 mask = ~directory mode
  2514.  
  2515. Users would set their umasks much as they do now, to cover the default case.
  2516. Directories like /tmp would be set 00 for security compatibility, while mail
  2517. directories would be set 01 for greater protection, project directories would
  2518. be set 10 to ensure that files and subdirectories were group writable, and
  2519. home directories might be set 11.
  2520.  
  2521. For the benefit of really paranoid programs/users, two bits could be added to
  2522. the umask to override the directory combination bits, although doing so would
  2523. add to the complexity of the system without really increasing security or
  2524. flexibility.
  2525.  
  2526.  
  2527. @alex
  2528.  
  2529. Volume-Number: Volume 5, Number 41
  2530.  
  2531. From jsq  Fri Feb  7 09:14:46 1986
  2532. From: std-unix%ut-sally.UUCP@SALLY.UTEXAS.EDU (Moderator, John Quarterman)
  2533. Newsgroups: mod.std.unix
  2534. Subject: Re: umask per directory?
  2535. Message-Id: <4132@ut-sally.UUCP>
  2536. References: <4034@ut-sally.UUCP> <4029@ut-sally.UUCP> <4060@ut-sally.UUCP>, <4083@ut-sally.UUCP>, <4122@ut-sally.UUCP>
  2537. Organization: IEEE/P1003 Portable Operating System Environment Committee
  2538. Date: 7 Feb 86 15:14:32 GMT
  2539. Draft-9: 5.1 5.3.3
  2540.  
  2541. Date: Fri, 7 Feb 86 01:12:07 pst
  2542. >From: pyramid!decwrl!mips!mash (John Mashey)
  2543.  
  2544. Re: having followed this discussion somewhat randomly, I thought that
  2545. was one the ways that people were casting this, and so cast the example
  2546. that way.  Perhaps a better way to state the general case is:
  2547.     a) one needs to specify the state vector associated with each
  2548.     object in the system.
  2549.     b) One must specify how operations depend on the state of the objects.
  2550.     c) Any time one adds a new item to an existing state vector,
  2551.     one should carefully check to see that it is needed, and is as general
  2552.     as makes sense, not just a special case.
  2553.     d) ANy time one adds an enitre new state vector, or a completely
  2554.     new kind of interaction with operations, like c), but more so.
  2555.  
  2556. Certainly, I don't feel very strongly about any of this, EXCEPT that
  2557. this feels to me like a wart of the following nature:
  2558.     a) It is a special case of potential value.
  2559.     b) It is a special case of some general case that has not yet been
  2560.     expressed.
  2561.     c) It is not of such critical nature that it should be implemented
  2562.     without better understanding the general case.
  2563.     d) If somebody really wants to, they can get almost any of
  2564.     the proposed effects by using 1) tweeked creat(2) Interface routine,
  2565.  
  2566.     2) environ variable checked by the new creat()
  2567.     3) a dot-file with umask value left in each directory.
  2568. The questions is: does anybody who has the source to do this have enough
  2569. interest to try this out?
  2570.  
  2571. Volume-Number: Volume 5, Number 42
  2572.  
  2573. From jsq  Sat Feb  8 02:19:05 1986
  2574. From: std-unix%ut-sally.UUCP@SALLY.UTEXAS.EDU (Moderator, John Quarterman)
  2575. Newsgroups: mod.std.unix
  2576. Subject: Re:  Clearing environment on exec of setuid process
  2577. Message-Id: <4141@ut-sally.UUCP>
  2578. References: <4128@ut-sally.UUCP> <4106@ut-sally.UUCP> <4029@ut-sally.UUCP>
  2579. Organization: IEEE/P1003 Portable Operating System Environment Committee
  2580. Date: 8 Feb 86 08:18:25 GMT
  2581. Draft-9: 3.1.2 4.2
  2582.  
  2583. >From: seismo!gatech!akgua!pegasus!hansen (Tony Hansen)
  2584. Sat Feb  8 00:48:16 1986
  2585. Date: Sat, 8 Feb 86 00:31:29 EST
  2586. Organization: AT&T-IS Labs, Lincroft, NJ
  2587.  
  2588. < The answer is only to do limited operations when in setuid.  The best
  2589. < way to do this would be to allow processes to painlessly shift back and
  2590. < forth between their real-uid and effective-uid.  This is allowed, but
  2591. < not documented on BSD, but appears not to be allowed at all on SV.
  2592.  
  2593. System Vr2 allows a non-root setuid process to call setuid(2) with either
  2594. the real uid or the saved effective uid, allowing the process to painlessly
  2595. switch back and forth. This change occurred between System V and Vr2.
  2596.  
  2597. One slight difference is that Vr2 non-root setuid(2) sets the effective uid
  2598. and not the real uid. Only a root setuid(2) will change the real uid as
  2599. well; which can't then be changed back.
  2600.  
  2601.                     Tony Hansen
  2602.                     ihnp4!pegasus!hansen
  2603.  
  2604.  
  2605.  
  2606. Volume-Number: Volume 5, Number 43
  2607.  
  2608. From jsq  Tue Feb 11 10:09:53 1986
  2609. From: std-unix%ut-sally.UUCP@SALLY.UTEXAS.EDU (Moderator, John Quarterman)
  2610. Newsgroups: mod.std.unix
  2611. Subject: Re:  Clearing environment on exec of setuid process
  2612. Message-Id: <4162@ut-sally.UUCP>
  2613. References: <4128@ut-sally.UUCP> <4106@ut-sally.UUCP> <4029@ut-sally.UUCP>
  2614. Organization: IEEE/P1003 Portable Operating System Environment Committee
  2615. Date: 11 Feb 86 16:09:24 GMT
  2616. Draft-9: 3.1.2 4.2
  2617.  
  2618. >From: Kay Dekker <seismo!mcvax!warwick!kay>
  2619. To: ut-sally!std-unix
  2620. Organization: Computer Science, Warwick University, UK
  2621. Date: Sat,  8 Feb 86 10:20:38 GMT
  2622.  
  2623. >Date: Wed, 5 Feb 86 08:12:33 pst
  2624. >>From: seismo!sun!rtech!daveb (Dave Brower)
  2625. >Organization: Relational Technology Inc, Alameda CA
  2626. >
  2627. >The answer is only to do limited operations when in setuid.  The best
  2628. >way to do this would be to allow processes to painlessly shift back and
  2629. >forth between their real-uid and effective-uid.  This is allowed, but
  2630. >not documented on BSD, but appears not to be allowed at all on SV.
  2631. >This way, you can have your one section that need to run setuid be setuid
  2632. >whenver needed, while running as the real user the reset of the time.
  2633.  
  2634. This is *exactly* what I found myself needing to do last night...  When
  2635. you say "BSD", does this include 4.1?  If so, how do I do it?  and why
  2636. isn't it documented?
  2637.  
  2638.                         Kay.
  2639. -- 
  2640. Virtue is its own punishment.
  2641.             ... mcvax!ukc!warwick!kay
  2642.  
  2643. [ It was introduced in 4.2BSD.  Here's the man page.
  2644. Note that only super-user can actually switch back and forth
  2645. between ruid and euid.  -mod ]
  2646.  
  2647.  
  2648. SETREUID(2)         UNIX Programmer's Manual          SETREUID(2)
  2649.  
  2650. NAME
  2651.      setreuid - set real and effective user ID's
  2652.  
  2653. SYNOPSIS
  2654.      setreuid(ruid, euid)
  2655.      int ruid, euid;
  2656.  
  2657. DESCRIPTION
  2658.      The real and effective user ID's of the current process are
  2659.      set according to the arguments.  If _r_u_i_d or _e_u_i_d is -1, the
  2660.      current uid is filled in by the system.  Only the super-user
  2661.      may modify the real uid of a process.  Users other than the
  2662.      super-user may change the effective uid of a process only to
  2663.      the real uid.
  2664.  
  2665. RETURN VALUE
  2666.      Upon successful completion, a value of 0 is returned.  Oth-
  2667.      erwise, a value of -1 is returned and _e_r_r_n_o is set to indi-
  2668.      cate the error.
  2669.  
  2670. ERRORS
  2671.      [EPERM]        The current process is not the super-user and
  2672.                     a change other than changing the effective
  2673.                     user-id to the real user-id was specified.
  2674.  
  2675. SEE ALSO
  2676.      getuid(2), setregid(2), setuid(3)
  2677.  
  2678. Printed 2/11/86         12 February 1983                        1
  2679.  
  2680. Volume-Number: Volume 5, Number 44
  2681.  
  2682. From jsq  Tue Feb 11 10:16:24 1986
  2683. From: std-unix%ut-sally.UUCP@SALLY.UTEXAS.EDU (Moderator, John Quarterman)
  2684. Newsgroups: mod.std.unix
  2685. Subject: Re:  Clearing environment on exec of setuid process
  2686. Message-Id: <4163@ut-sally.UUCP>
  2687. References: <4141@ut-sally.UUCP> <4128@ut-sally.UUCP> <4106@ut-sally.UUCP> <4029@ut-sally.UUCP>
  2688. Organization: IEEE/P1003 Portable Operating System Environment Committee
  2689. Date: 11 Feb 86 16:15:56 GMT
  2690. Draft-9: 3.1.2 4.2
  2691.  
  2692. Date: Sun, 9 Feb 86 22:00:20 pst
  2693. >From: pyramid!csg (Carl S. Gutekunst)
  2694. Organization: Pyramid Technology Corp., Mountain View, CA
  2695.  
  2696. >> The answer is only to do limited operations when in setuid.  The best
  2697. >> way to do this would be to allow processes to painlessly shift back and
  2698. >> forth between their real-uid and effective-uid.  This is allowed, but
  2699. >> not documented on BSD, but appears not to be allowed at all on SV.
  2700. >
  2701. >System Vr2 allows a non-root setuid process to call setuid(2) with either
  2702. >the real uid or the saved effective uid, allowing the process to painlessly
  2703. >switch back and forth. This change occurred between System V and Vr2.
  2704.  
  2705. Something is silly here; if you think it's important I'd appreciate it if
  2706. you'd verify this with someone who knows:
  2707.  
  2708. System V has always had the ability to switch the effective UID between the
  2709. real UID and the saved effective UID. (And it isn't documented, BTW. We
  2710. discovered it the hard way when some of the V.0 utilities wouldn't run.)
  2711. Berkeley, however, has never had this capability. There are a number of other
  2712. curious variations and exceptions, although that's fodder for net.unix... :-) 
  2713.  
  2714. [ Does anybody know when the capability was introduced?  PWB, System III,
  2715. System V?  As for what BSD has along these lines, see previous article.
  2716.  
  2717. I'm beginning to agree that this discussion really belongs on net.unix.
  2718. -mod ]
  2719.  
  2720. <csg>
  2721.  
  2722. Volume-Number: Volume 5, Number 45
  2723.  
  2724. From jsq  Tue Feb 11 10:20:43 1986
  2725. From: std-unix%ut-sally.UUCP@SALLY.UTEXAS.EDU (Moderator, John Quarterman)
  2726. Newsgroups: mod.std.unix
  2727. Subject: Re:  Clearing environment on exec of setuid process
  2728. Message-Id: <4164@ut-sally.UUCP>
  2729. References: <4128@ut-sally.UUCP> <4106@ut-sally.UUCP> <4029@ut-sally.UUCP> <4141@ut-sally.UUCP>
  2730. Reply-To: thomas@utah-gr.UUCP (Spencer W. Thomas)
  2731. Organization: IEEE/P1003 Portable Operating System Environment Committee
  2732. Date: 11 Feb 86 16:20:24 GMT
  2733. Draft-9: 3.1.2 4.2
  2734.  
  2735. Date: Mon, 10 Feb 86 11:06:44 MST
  2736. >From: thomas%utah-gr@UTAH-CS.ARPA (Spencer W. Thomas)
  2737. Organization: University of Utah, Salt Lake City
  2738.  
  2739. In article <4141@ut-sally.UUCP> pegasus!hansen (Tony Hansen) writes:
  2740. >One slight difference is that Vr2 non-root setuid(2) sets the effective uid
  2741. >and not the real uid. Only a root setuid(2) will change the real uid as
  2742. >well; which can't then be changed back.
  2743.  
  2744. This seems to me to be a potential security problem.  It means that you
  2745. cannot write a program to give a certain set of people access to a
  2746. particular uid (ala su) without making it setuid root.  It would be much
  2747. safer, it seems to me, to make it setuid to the uid you want to give
  2748. access to, and let it do setuid(geteuid()).  This is necessary if, for
  2749. example, the program wants to fork a real setuid program with the new
  2750. uid.  We have a number of programs that do this.  Yet another reason to
  2751. not use SV.
  2752.  
  2753. [ Please, let's not start up the System V vs. 4BSD argument here.  -mod ]
  2754.  
  2755. -- 
  2756. =Spencer   ({ihnp4,decvax}!utah-cs!thomas, thomas@utah-cs.ARPA)
  2757.  
  2758. Volume-Number: Volume 5, Number 46
  2759.  
  2760. From jsq  Tue Feb 11 22:08:07 1986
  2761. From: std-unix%ut-sally.UUCP@SALLY.UTEXAS.EDU (Moderator, John Quarterman)
  2762. Newsgroups: mod.std.unix
  2763. Subject: POSE proposal for TZ
  2764. Message-Id: <4168@ut-sally.UUCP>
  2765. Organization: IEEE/P1003 Portable Operating System Environment Committee
  2766. Date: 12 Feb 86 04:07:42 GMT
  2767. Draft-9: TZ.P.046
  2768.  
  2769. >From: seismo!hao!asgb!benish!devine
  2770. Date: Tue, 11 Feb 86 11:21:51 mst
  2771.  
  2772.   Hi, here is a letter that I sent to the IEEE mailing address for
  2773. POSE proposals.  It deals with timezones and Daylight Saving Time
  2774. rules and how to incorporate them portably into a UNIX environment.
  2775. Its advantages are: follows System III/V model; allows users and
  2776. programs to override system timezone information; works for all
  2777. present country TZ and DST rules; and flexibility.
  2778.  
  2779. Bob Devine; 3133 Lake Park Way; Longmont, CO 80501; (303) 772-2410
  2780. (seismo!hao!asgb!devine  sdcrdcf!bmcg!asgb!devine)
  2781.  
  2782. ---------------------------------------------------------------------
  2783.     
  2784.     Secretary, IEEE Standards Board
  2785.     Institute of Electrical and Electronics Engineers
  2786.     345 East 17th Street
  2787.     New York, NY 10017
  2788.     
  2789.     
  2790.     
  2791.     
  2792.       This is a suggested resolution for the handling of world timezones
  2793.     and Daylight Saving Time for the P1003/Portable Operating System
  2794.     Environment document.  Appendix A.3 asked for such a resolution.
  2795.     
  2796.     
  2797.       The major points of the proposal are:
  2798.     
  2799.     
  2800.             1. There is a world-readable, superuser-modifiable file
  2801.                named "/etc/TIMEZONE" that describes the per-system
  2802.                timezone information and Daylight Saving Time rules.
  2803.     
  2804.     
  2805.             2. TIMEZONE contains the following lines in Bourne shell
  2806.                syntax:
  2807.     
  2808.                TZ=ABC
  2809.                DST="dst1 dst2"
  2810.                export TZ DST
  2811.     
  2812.     
  2813.             3. The TZ variable has 2 required parts (and an optional 3rd):
  2814.     
  2815.                A = standard abbreviation for the timezone as used by the
  2816.                local area
  2817.                    A :== [A-Z][A-Z]*
  2818.                B = plus or minus difference in minutes from Universal Time,
  2819.                plus for those locations east of GMT, minus for west
  2820.                    B :== [+-][0-9][0-9][0-9]
  2821.                C = standard abbreviation for the timezone as used by the
  2822.                local area when Daylight Saving Time is in effect.  This
  2823.            part of TZ may be absent if DST is not used.
  2824.                    C :== [A-Z][A-Z]*
  2825.     
  2826.                Example for my location in Boulder, Colorado, USA:
  2827.                    TZ=MST-420MDT
  2828.     
  2829.     
  2830.             4. The DST variable has 0 or 2 parts in the string.  It has
  2831.                zero if no Daylight Saving Time is observed or 2, when DST
  2832.                starts and ends, for those places that do observe it.  I
  2833.                have been unable to locate any place in the world that has
  2834.            1, 3, or more changes per year to its local time.  If DST
  2835.            is not null, the string means:
  2836.     
  2837.                  dst1 = a string that describes when DST starts
  2838.                  dst2 = a string that describes when DST stops
  2839.     
  2840.                Both have the syntax of "mmddDhhMM%CCcc".  Translating it:
  2841.     
  2842.                  mm  = the month (January = 01)
  2843.                  dd  = the day of the month (01 to 31)
  2844.                  D   = the "search-forward" function number
  2845.                    (0-7) usually 1 or 0
  2846.                          0 = use the day mm/dd without translation
  2847.                          1 = search forward to the first Sunday
  2848.                          2 =        "                    Monday
  2849.                          3 =        "                    Tuesday
  2850.                          4 =        "                    Wednesday
  2851.                          5 =        "                    Thursday
  2852.                          6 =        "                    Friday
  2853.                          7 =        "                    Saturday
  2854.                  hh  = the hour at which the change goes into effect
  2855.                    (00-23) usually 01, 02 or 03
  2856.                  MM  = the minute at which the change goes into effect
  2857.                (00-59) usually 00
  2858.                  %   = a '+' or a '-' saying what direction to move
  2859.                  CC  = how many hours to move (00-23) usually 01 or 02
  2860.                  cc  = how many minutes to move (00-23) usually 00
  2861.     
  2862.                Example for my location in Boulder, Colorado, USA in 1986:
  2863.                    DST="042410200+0100  102510200-0100"
  2864.                Alternately, if I already know the exact dates that DST
  2865.            starts and ends for that year, I can use:
  2866.                    DST="042700200+0100  102600200-0100"
  2867.     
  2868.     
  2869.             5. If the file is unreadable or missing, the default time
  2870.            zone to use is GMT and the default DST is null.
  2871.     
  2872.  
  2873.             6. The library call "localtime()" is the only system code
  2874.                that need interpret the TZ and DST variables.
  2875.  
  2876.     
  2877.             7. TZ and DST are put into the environment of each user
  2878.                when the user logs in.  A user can change create their
  2879.                own TZ and DST values and replace the system maintained
  2880.                values in their environment.
  2881.     
  2882.             8. Those utilities that strip off environment information
  2883.                can obtain TZ and DST values by reading "/etc/TIMEZONE".
  2884.     
  2885.     
  2886.     
  2887.     Bob Devine
  2888.     (303) 530-6635
  2889.     Burroughs Distributed Systems Group
  2890.     6655 Lookout Road
  2891.     Boulder, CO. 80301
  2892.     
  2893.     UUCP: ihnp4!seismo!hao!asgb!devine OR sdcrdcf!bmcg!asgb!devine
  2894.  
  2895. Volume-Number: Volume 5, Number 47
  2896.  
  2897. From jsq  Wed Feb 12 11:16:45 1986
  2898. From: std-unix%ut-sally.UUCP@SALLY.UTEXAS.EDU (Moderator, John Quarterman)
  2899. Newsgroups: mod.std.unix
  2900. Subject: Re: POSE proposal for TZ
  2901. Message-Id: <4173@ut-sally.UUCP>
  2902. Organization: IEEE/P1003 Portable Operating System Environment Committee
  2903. Date: 12 Feb 86 17:16:01 GMT
  2904. Draft-9: TZ.P.046
  2905.  
  2906. Date: Wed, 12 Feb 86 04:26:15 EST
  2907. >From: Chris Torek <chris@MIMSY.UMD.EDU>
  2908.  
  2909. I have tried to stay out of this discussion since I know little of
  2910. existing time zone standards and have never needed anything but
  2911. the 4BSD system time zone.  However, I would like to ask that the
  2912. following suggested rule be amended:
  2913.  
  2914. >4. The DST variable has 0 or 2 parts in the string.  It has
  2915. >   zero if no Daylight Saving Time is observed or 2, when DST
  2916. >   starts and ends, for those places that do observe it.  I
  2917. >   have been unable to locate any place in the world that has
  2918. >   1, 3, or more changes per year to its local time.
  2919.  
  2920. Rest assured that the moment this became a standard and everyone
  2921. conformed to it (comments upon the likelyhood of that eventuality
  2922. notwithstanding), Murphy would strike and Congress would legistlate
  2923. some really crazy DST rules.
  2924.  
  2925. I see no good reason for requiring the string to have exactly 0 or
  2926. 2 parts (efficiency of specific implementations does not count as
  2927. a good reason).
  2928.  
  2929. (I suspect also that once this were standardised, someone would
  2930. come up with a time zone name that requires a digit or a plus or
  2931. minus sign, making rule 3 unworkable as well....)
  2932.  
  2933. Chris
  2934.  
  2935. Volume-Number: Volume 5, Number 48
  2936.  
  2937. From jsq  Thu Feb 13 10:59:21 1986
  2938. From: std-unix%ut-sally.UUCP@SALLY.UTEXAS.EDU (Moderator, John Quarterman)
  2939. Newsgroups: mod.std.unix
  2940. Subject: mod.std.unix
  2941. Message-Id: <4186@ut-sally.UUCP>
  2942. Organization: IEEE/P1003 Portable Operating System Environment Committee
  2943. Date: 13 Feb 86 16:59:03 GMT
  2944. Draft-9: TZ
  2945.  
  2946. >From: harvard!cybvax0!vcvax1!paul (Paul Kleppner)
  2947. Date: Wed, 12 Feb 86 18:58:56 est
  2948.  
  2949. Bob Devine's proposal on the /etc/TIMEZONE format (volume 5, #47)
  2950. looks to me like a good solution to a complicated problem.
  2951. I do have one suggestion, though: don't clutter the /etc/TIMEZONE file
  2952. with Bourne shell syntax.  If the file contained only the two actual values
  2953. (separated by a space or tab) and not the "TZ=", "DST=",
  2954. and "export" comands, it would be much easier to read by non-Bourne
  2955. shells or by other programs, which would otherwise have to filter
  2956. out the shell statements.
  2957.  
  2958. I should point out that there is no loss in efficiency with this approach.
  2959. The login initialization file /etc/profile, instead of containing the line,
  2960.  
  2961.     . /etc/TIMEZONE
  2962.  
  2963. would contain the lines
  2964.  
  2965.     read TZ DST < /etc/TIMEZONE
  2966.     export TZ DST
  2967.  
  2968. (I believe this will work correctly whether DST has 0 or 2 parts.)
  2969. ------------
  2970. Paul Kleppner
  2971. VenturCom, Inc.
  2972. 617/661-1230
  2973. {seismo!harvard,genrad!mit-eddie}!cybvax0!vcvax1!paul
  2974.  
  2975. Volume-Number: Volume 5, Number 49
  2976.  
  2977. From jsq  Fri Feb 14 06:12:44 1986
  2978. From: std-unix%ut-sally.UUCP@SALLY.UTEXAS.EDU (Moderator, John Quarterman)
  2979. Newsgroups: mod.std.unix
  2980. Subject: Re: POSE proposal for TZ
  2981. Message-Id: <4190@ut-sally.UUCP>
  2982. References: <4186@ut-sally.UUCP>
  2983. Organization: IEEE/P1003 Portable Operating System Environment Committee
  2984. Date: 14 Feb 86 12:12:31 GMT
  2985. Draft-9: TZ.P.046
  2986.  
  2987. Date: Fri, 14 Feb 86 00:51:16 PST
  2988. >From: sun!guy@seismo.UUCP (Guy Harris)
  2989.  
  2990. >      The major points of the proposal are:
  2991. >    
  2992. >            1. There is a world-readable, superuser-modifiable file
  2993. >               named "/etc/TIMEZONE" that describes the per-system
  2994. >               timezone information and Daylight Saving Time rules.
  2995.  
  2996. Too specific.  The standard should not give all the implementation details.
  2997. Giving this much detail merely constrains an implementation to use the
  2998. particular technique specified, even if it isn't the appropriate technique
  2999. to use (on a V7 or 4BSD system, for instance, fetching it from the kernel is
  3000. more appropriate, since it's already there).
  3001.  
  3002. >            3. The TZ variable has 2 required parts (and an optional 3rd):
  3003. >    
  3004. >               A = standard abbreviation for the timezone as used by the
  3005. >                local area
  3006. >                    A :== [A-Z][A-Z]*
  3007. >               B = plus or minus difference in minutes from Universal Time,
  3008. >               plus for those locations east of GMT, minus for west
  3009. >                   B :== [+-][0-9][0-9][0-9]
  3010. >               C = standard abbreviation for the timezone as used by the
  3011. >                local area when Daylight Saving Time is in effect.  This
  3012. >            part of TZ may be absent if DST is not used.
  3013. >                   C :== [A-Z][A-Z]*
  3014.  
  3015. Unnecessarily incompatible with System V, which specifies the offset from
  3016. Universal Time in hours.  (It also requires you to multiply an offset in
  3017. hours by 60, which is much better done by a computer.)  See below for a
  3018. better way of specifying offsets which aren't an integral number of hours.
  3019.  
  3020. >            4. The DST variable has 0 or 2 parts in the string.  It has
  3021. >               zero if no Daylight Saving Time is observed or 2, when DST
  3022. >               starts and ends, for those places that do observe it.
  3023.  
  3024. Not sufficient.  The routines that convert between GMT and local time can be
  3025. given a time not in the current year; if the time is in a year prior to the
  3026. current one, these routines must still be able to convert it, and must
  3027. therefore know the rules for all years prior to the current one.  (The
  3028. 4.2BSD source indicates that the rules for 1970, 1971, and 1972 in Australia
  3029. were all rather different; 1970 had no daylight savings time, 1971 had it
  3030. from October 31 to the end of the year, 1972 had it from January 1 to
  3031. February 27 and October 31 to December 31, and all subsequent years had it
  3032. January 1 to March 7 and October 31 to December 31.  In the US, of course,
  3033. we had the infamous "nixonflag" for 1974 and 1975....)  For times in the
  3034. future, of course, it will have to rely on a projection (if it could handle
  3035. times in the future exactly, I'd put it to work on Sun's stock price...).
  3036.     
  3037. >            7. TZ and DST are put into the environment of each user
  3038. >               when the user logs in.
  3039. >
  3040. >            8. Those utilities that strip off environment information
  3041. >               can obtain TZ and DST values by reading "/etc/TIMEZONE".
  3042.  
  3043. What puts TZ and DST into the environment of each user?  If it's not done by
  3044. "login", then every program which is used as a login shell must do it.  A
  3045. LOT of UNIX systems have many users who log in to a specific application,
  3046. which may never run the shell.  As such, it should be done by "login", which
  3047. makes the Bourne shell syntax unhelpful.
  3048.  
  3049. And what about utilities not run by a logged-in user?  Must they look in
  3050. "/etc/TIMEZONE"?  If so, do they have to do their own parsing?  There is
  3051. already a routine in System V called "tzset()", which sets the global
  3052. variables "timezone" and "daylight".  In vanilla S5, it just scans the TZ
  3053. environment variable (which means you have to go through contortions to get
  3054. that variable set).  In systems which have a source for time zone
  3055. information other than TZ, they can scan TZ if present and non-null, and use
  3056. that source otherwise.  In your proposal, "tzset()" should scan that file.
  3057. However, we have now eliminated the need for any program to look at
  3058. "/etc/TIMEZONE" directly - they should let "tzset()" do it for them.
  3059.  
  3060. The trouble is that there are several ways of storing the time zone
  3061. information, other than in the TZ environment variable.  V7 stored it,
  3062. in effect, in "/unix"; you specified it when you built your kernel.  4.2BSD
  3063. also stores it there (in "/vmunix", actually); you can specify it when you
  3064. build your kernel, but you can also specify it with the "settimeofday"
  3065. system call.  A system running on a machine with an EEPROM might store the
  3066. time zone there, and either read it out when the machine is booted or make
  3067. it readable by user programs.  A "hosted" system (i.e., a system which
  3068. provides a P1003-compatible environment on top of an existing operating
  3069. system) might be able to get it out of the host operating system.  A table
  3070. containing this operation might be mapped into the address space of all
  3071. processes in any of a number of ways, depending on the memory model of the
  3072. OS and the whims of the OS's designers.
  3073.  
  3074. It's inappropriate to commit to something as specific as "/etc/TIMEZONE";
  3075. "tzset()" should be specified as fetching the appropriate information and
  3076. setting the "timezone", "daylight", and "tzname" external variables (System
  3077. V-style) and also arranging, somehow, for the daylight savings time rules to
  3078. be set up.
  3079.  
  3080. The only copy of the X3J11 C standard draft I can get my hands on right now
  3081. is an old one.  It lists "asctime", "ctime", "gmtime", and "localtime" as
  3082. being like their UNIX versions, but doesn't list "tzset", "timezone",
  3083. "daylight", or "tzname".  Presumably, it considers them to be part of the
  3084. operating system (or environment) rather than the C language/library.  (Have
  3085. they been added in later drafts?)  If they haven't been added in later
  3086. drafts, I propose that P1003 adopt the System V versions, as specified in
  3087. the System V Interface Definition, with the following change:
  3088.  
  3089. change
  3090.  
  3091.     ...the external variable "daylight" is non-zero only if the
  3092.     standard U.S.A. Daylight Savings Time conversion should be
  3093.     applied.  The program compensates for the peculiarities
  3094.     of this conversion in 1974 and 1975; if necessary, a table
  3095.     for these years can be extended.
  3096.  
  3097.     If an environment variable named TZ is present, "asctime" uses the
  3098.     contents of the variable to override the default time zone.  The
  3099.     value of TZ must be a three-letter time zone name, followed
  3100.     by an optional minus sign (for zones east of Greenwich) and
  3101.     a series of digits representing the difference between local time
  3102.     and Greenwich Mean Time in hours; this is followed by an
  3103.     optional three-letter name for a daylight time zone.
  3104.  
  3105. to
  3106.  
  3107.     ...the external variable "daylight" is non-zero only if the
  3108.     standard Daylight Savings Time conversion for the current time
  3109.     zone, if any, should be applied.  The external variable "tzname"
  3110.     contains pointers to the name of the time zone when daylight
  3111.     savings time is    not in effect and when it is in effect in its
  3112.     first and second members, respectively.
  3113.  
  3114.     The default time zone is settable by the system administrator,
  3115.     and is usually the time zone that the majority of the system's
  3116.     users are in.  "tzset" normally sets the variables "timezone",
  3117.     "daylight", and "tzname" to the values for the default time zone.
  3118.     If an environment variable named TZ is present, "tzset" sets the
  3119.     variables "timezone", "daylight", and "tzname" from the value
  3120.     of this environment variable.  The value of TZ must either be
  3121.     of the form "GMT+hh[:mm]", or "GMT-hh[:mm]", specifying an
  3122.     unnamed time zone "hh" hours and "mm" minutes ahead of or behind
  3123.     Universal Time (if "mm" is not present, it is assumed to be
  3124.     zero), or a zone name followed by an optional minus sign (for
  3125.     zones east of Greenwich) and a specification of the form "hh[:mm]"
  3126.     specifying the difference between local time and Universal Time
  3127.     in hours and minutes; this is followed by an optional name for the
  3128.     time zone when Daylight Savings Time is in effect.  A time zone name
  3129.     must not contain any digits and must not contain the characters "+",
  3130.     "-", or ":".  If an unnamed zone is specified, Daylight Savings
  3131.     time rules are considered not to apply, and the time zone name is
  3132.     assumed to be the value of the TZ environment variable.
  3133.  
  3134. I include the "GMT+/-hh:mm" specification on the assumption that there are
  3135. unnamed time zones; if this is not so, this part may be deleted.  Note that
  3136. unlike the System V TZ value, this permits time zone names to be longer or
  3137. shorter than 3 characters.  It also permits fractional-hour time zone
  3138. offsets; it uses a different syntax than the one described in the "FUTURE
  3139. DIRECTIONS" section, because that section doesn't indicate whether the
  3140. time zone offset must be four digits (which would mean that EST5EDT would no
  3141. longer be valid) or not (which would mean that OLT7ODT would be ambiguous -
  3142. is Out to Lunch Time 7 hours away from GMT or 7 minutes?).  The proposed
  3143. syntax is an upward-compatible extension of the current syntax, which the
  3144. syntax in the "FUTURE DIRECTIONS" section is not.
  3145.  
  3146. If TZ is not set, "tzset" will presumably get the Daylight Savings Time
  3147. rules from some standard place (where it gets them from is an implementation
  3148. detail which does not belong in P1003).  If TZ is set, there should be some
  3149. indication of where it gets the DST rules from.  It can either get them from
  3150. some "standard" database of rules, or from an environment variable (either
  3151. from additional data at the end of TZ, or from DST), or both (i.e., if the
  3152. rules aren't specified in an environment variable, it uses the time zone
  3153. specified in TZ to look up the rules in the standard database).
  3154.  
  3155. Volume-Number: Volume 5, Number 50
  3156.  
  3157. From jsq  Tue Feb 18 14:59:17 1986
  3158. From: std-unix%ut-sally.UUCP@SALLY.UTEXAS.EDU (Moderator, John Quarterman)
  3159. Newsgroups: mod.std.unix
  3160. Subject: Re: POSE proposal for TZ
  3161. Message-Id: <4209@ut-sally.UUCP>
  3162. Organization: IEEE/P1003 Portable Operating System Environment Committee
  3163. Date: 18 Feb 86 20:59:02 GMT
  3164. Draft-9: TZ.P.046
  3165.  
  3166. Date: Sun, 16 Feb 86 00:31:47 cst
  3167. >From: ihnp4!uiucdcs!ccvaxa!aglew@SEISMO.CSS.GOV (Andy Glew)
  3168.  
  3169. Pardon me if I've missed anything in this discussion, but has anyone 
  3170. considered the possiblity of double daylight savings time - not just 
  3171. two hours offset, but 2 hours in the deep of summer and one hour in
  3172. spring and fall (or, one hour's saving in summer, none in fall, and 
  3173. an "unsaving" in deepest winter). 
  3174.  
  3175. [ I don't recall anyone mentioning that before.  -mod ]
  3176.  
  3177. Volume-Number: Volume 5, Number 51
  3178.  
  3179. From jsq  Tue Feb 18 15:03:09 1986
  3180. From: std-unix%ut-sally.UUCP@SALLY.UTEXAS.EDU (Moderator, John Quarterman)
  3181. Newsgroups: mod.std.unix
  3182. Subject: Re: POSE proposal for TZ
  3183. Message-Id: <4210@ut-sally.UUCP>
  3184. Organization: IEEE/P1003 Portable Operating System Environment Committee
  3185. Date: 18 Feb 86 21:02:52 GMT
  3186. Draft-9: TZ.P.046
  3187.  
  3188. >From: hao!asgb!devine@seismo.UUCP (Bob Devine)
  3189. Date: Mon, 17 Feb 86 18:00:40 mst
  3190.  
  3191. >>From: Chris Torek <chris@MIMSY.UMD.EDU>
  3192.  
  3193. >>Discussion of (1) why Daylight Saving Time should not be constrained
  3194. >>to either 0 or 2 changes per year; and (2) cautioning against a
  3195. >>timezone name that may contain numerals, '+', or '-'.  Both points
  3196. >>emphasized the possibility of future bizarre changes.
  3197.  
  3198.  
  3199.   Yes, I was aware and worried about both problems.  However, in my
  3200. search of timezones and DST rules worldwide I was not able to find any
  3201. current or past rules that would have violated the assumptions.  Future
  3202. rules are unlikely to break the current conventions for fear of confusing
  3203. everybody (it's bad enough now).
  3204.  
  3205.   Parsing the strings for TZ _COULD_ be done using reserved characters
  3206. but that would really break the old usage of the TZ environment variable.
  3207. I'm hoping to only bend it.  Likewise, the library call that interprets
  3208. the DST strings _COULD_ be written in a generalized fashion to handle any
  3209. number of DST changes per year.  However, I don't think such effort is 
  3210. required.
  3211.  
  3212. Bob Devine
  3213. (BTW, Sys V spell doesn't have "timezone" in its dictionary.)
  3214.  
  3215. Volume-Number: Volume 5, Number 52
  3216.  
  3217. From jsq  Wed Feb 19 21:31:33 1986
  3218. From: std-unix%ut-sally.UUCP@SALLY.UTEXAS.EDU (Moderator, John Quarterman)
  3219. Newsgroups: mod.std.unix
  3220. Subject: Re: POSE proposal for TZ
  3221. Message-Id: <4223@ut-sally.UUCP>
  3222. References: your article <4210@ut-sally.UUCP>
  3223. Organization: IEEE/P1003 Portable Operating System Environment Committee
  3224. Date: 20 Feb 86 03:31:19 GMT
  3225. Draft-9: TZ.P.046
  3226.  
  3227. >From: seismo!umcp-cs!aplvax!osiris!phil (Philip Kos)
  3228.  
  3229.  
  3230. > Bob Devine
  3231. > (BTW, Sys V spell doesn't have "timezone" in its dictionary.)
  3232.  
  3233.  
  3234. Neither does 4.2, at least on our Pyramid.
  3235.  
  3236. Phil Kos
  3237. The Johns Hopkins Hospital, Baltimore, MD
  3238.  
  3239. Volume-Number: Volume 5, Number 53
  3240.  
  3241. From jsq  Thu Feb 20 08:14:18 1986
  3242. From: std-unix%ut-sally.UUCP@SALLY.UTEXAS.EDU (Moderator, John Quarterman)
  3243. Newsgroups: mod.std.unix
  3244. Subject: Re: POSE proposal for TZ
  3245. Message-Id: <4226@ut-sally.UUCP>
  3246. Organization: IEEE/P1003 Portable Operating System Environment Committee
  3247. Date: 20 Feb 86 14:14:02 GMT
  3248. Draft-9: TZ.P.046
  3249.  
  3250. Date: Wed, 19 Feb 86 17:58:51 est
  3251. From: seismo!cbosgd.ATT.UUCP!mark (Mark Horton)
  3252.  
  3253. >  Yes, I was aware and worried about both problems.  However, in my
  3254. >search of timezones and DST rules worldwide I was not able to find any
  3255. >current or past rules that would have violated the assumptions.  Future
  3256. >rules are unlikely to break the current conventions for fear of confusing
  3257. >everybody (it's bad enough now).
  3258.  
  3259. You haven't looked hard enough.  Also, the minute you make an assumption,
  3260. some congressman or some MP in Britain or Japan or wherever will violate it.
  3261.  
  3262. >>>Discussion of (1) why Daylight Saving Time should not be constrained
  3263. >>>to either 0 or 2 changes per year;
  3264.  
  3265. There is a thing called "Double Daylight Time" which does exactly that.
  3266. I think it happened a few years back in some other country (Canada?)
  3267. Surely someone on this list can provide details.
  3268.  
  3269. >>>and (2) cautioning against a
  3270. >>>timezone name that may contain numerals, '+', or '-'.  Both points
  3271. >>>emphasized the possibility of future bizarre changes.
  3272.  
  3273. On the contrary, the notion of giving a time zone a name is an American
  3274. notion.  They also have names in Europe and Australia, but my impression
  3275. is that in many parts of the world, such as Japan, time zones are named
  3276. according to the ISO format +HHMM, e.g. Japan is +0900.
  3277.  
  3278. I'm afraid the variable TZ is already pretty badly broken - it can't be
  3279. used in Newfoundland or Central Australia or Saudi Arabia.  (We do have
  3280. sites on Usenet in Newfoundland - as far as I know, they all run 4BSD.)
  3281.  
  3282. elsie!ado has written some code with a much more flexible structure
  3283. (and some additional complexity, which I think is unavoidable.)  I
  3284. understand he's going to submit it to this group shortly.  I think
  3285. it merits serious consideration.  How much goes into the standard and
  3286. how much is left to the implementor isn't clear (e.g. is the format
  3287. of the time zone description file part of the standard?) but the code
  3288. is intended to be public domain, and it ought to make a good start.
  3289.  
  3290.     Mark
  3291.  
  3292. Volume-Number: Volume 5, Number 54
  3293.  
  3294. From jsq  Fri Feb 21 13:12:10 1986
  3295. From: std-unix%ut-sally.UUCP@SALLY.UTEXAS.EDU (Moderator, John Quarterman)
  3296. Newsgroups: mod.std.unix
  3297. Subject: Re: POSE proposal for TZ
  3298. Message-Id: <4238@ut-sally.UUCP>
  3299. References: <4190@ut-sally.UUCP> <4186@ut-sally.UUCP>
  3300. Organization: IEEE/P1003 Portable Operating System Environment Committee
  3301. Date: 21 Feb 86 19:11:54 GMT
  3302. Draft-9: TZ.P.046
  3303.  
  3304. From: seismo!kobold!ncr-sd!greg
  3305. Date: Thu, 20 Feb 86 19:54:17 pst
  3306. Organization: NCR Corporation, Rancho Bernardo
  3307.  
  3308. In article <4186@ut-sally> Bob Devine proposes a standard method to hold
  3309. the timezone information, which keeps the information in a file in a format
  3310. suitable for interpretation by the (Bourne) shell.
  3311.  
  3312. In article <4190@ut-sally.UUCP> Guy Harris replies:
  3313. >        ....
  3314. >Too specific.  The standard should not give all the implementation details.
  3315. >        ....
  3316. >Unnecessarily incompatible with System V, which specifies the offset from
  3317. >        ....
  3318. >Not sufficient.  The routines that convert between GMT and local time can be
  3319. >        ....    
  3320. >What puts TZ and DST into the environment of each user?  If it's not done by
  3321. >        ....
  3322. >And what about utilities not run by a logged-in user?  Must they look in
  3323. >        ....
  3324.  
  3325. I agree; the scheme is flawed by all of those problems and more.  I don't
  3326. have any skill with words (in the way they are used in specifications), but
  3327. I would propose that any scheme adopted by the standards commitee should have
  3328. the following requirements:
  3329.   -  There should be a way that a system administrator could specify a global
  3330.      (system-wide) default that is not process-tree related.  In other words,
  3331.      it can't depend upon something in the environment.
  3332.   -  There should be a way that this can be overridden so that non-default
  3333.      timezones can be supported.  Presumably, this can be done on a process-
  3334.      tree basis; i.e., it can be carried in the environment.
  3335.   -  It should be possible to handle things like multiple timezone changes
  3336.      per year (double daylight savings, like during WWII) and timezone changes
  3337.      that are not exactly one hour (didn't Newfoundland once have a daylight
  3338.      savings change of 1.5 hours?).
  3339.  
  3340. Personally, I think a better scheme is the one presented here a month or so
  3341. ago, where the timezone information lives in a directory with one file for
  3342. each timezone and with the standard timezone linked to a default name.  A user
  3343. could override the default by specifying one of the files in an environment
  3344. variable, or roll his own file and specify the full path name.  The file
  3345. would contain:
  3346.   -  The timezone offset and default name.
  3347.   -  The rules for the normal conversion and the name for it.
  3348.   -  Exceptional periods, the offset, and the name.
  3349. Here I am being too specific myself, but I wanted to point out that Bob Devine
  3350. has done us a great service by articulating a mechanism for describing the
  3351. normal conversion (the second point above); whether this information is to
  3352. be included in the file and processed on the fly or pre-processed by some
  3353. program into a binary table that can be evaluated quickly is an implementation
  3354. consideration.
  3355.  
  3356. -- Greg Noel, NCR Rancho Bernardo    Greg@ncr-sd.UUCP or Greg@nosc.ARPA
  3357.  
  3358. Volume-Number: Volume 5, Number 55
  3359.  
  3360. From jsq  Fri Feb 21 13:14:14 1986
  3361. From: std-unix%ut-sally.UUCP@SALLY.UTEXAS.EDU (Moderator, John Quarterman)
  3362. Newsgroups: mod.std.unix
  3363. Subject: TZ yet again
  3364. Message-Id: <4239@ut-sally.UUCP>
  3365. Organization: IEEE/P1003 Portable Operating System Environment Committee
  3366. Date: 21 Feb 86 19:14:02 GMT
  3367. Draft-9: TZ
  3368.  
  3369. Date: Thu, 20 Feb 86 13:11:50 est
  3370. From: Davidsen <seismo!rochester!steinmetz!davidsen>
  3371.  
  3372. I posted some thoughts on TZ previously, but I don't believe they got out,
  3373. due to a mail problem at that time. Forgive me if you've heard this before.
  3374.  
  3375. Some of the problems with TZ are:
  3376.     1) non-standard names and abbreviations
  3377.     2) strange DST rules
  3378.     3) (1) and (2) change or may be added to.
  3379.  
  3380. Posible Solution #1:
  3381. -------------------
  3382.  
  3383.   One method of solving these problems would be to use the value of TZ as
  3384. the name of a file in a special directory. These files would be
  3385. executable, and given the current date and time in GMT would return the
  3386. number of minutes to be added to GMT for that timezone (obviously the
  3387. return value is signed).
  3388.  
  3389. Drawbacks:
  3390.   The only obvious one I see is overhead. A directory search + execution
  3391. is not nearly as nice as just getting a number from the environment. I
  3392. don't have a good idea what it would add as a percentage to the execution
  3393. time of localtime(). Since the time may change at any given instant, the
  3394. system can not just execute each program once and save the result.
  3395.  
  3396. Advantages:
  3397.   Any number of timezones may be used, and timezones may be added or
  3398. deleted easily. If performance is really an issue (I'm not convinced
  3399. either way), then the directory could be cached in some way.
  3400.  
  3401.   The algorithm may be easily changed and any level of complexity can be
  3402. handled. Programmers can handle more complexity than politicians.
  3403.  
  3404. Posible Solution #2:
  3405. -------------------
  3406.  
  3407.   Add another form of the TZ variable which contains all the information
  3408. needed to handle the current algorithm. One posible form of this would be:
  3409.     TZ=M:D:DOW:h:m:Name/Offset [;TZ=M:D:DOW:H:M:Name/Offset ...]
  3410.  
  3411. Where: (times in GMT)
  3412.      M - month of the change
  3413.      D - date of the change, as a value or range (ie "14" or "14-20")
  3414.    DOW - day of the week, a value, range, or "*".
  3415.      h - hour of the change
  3416.      m - minute of the change
  3417.   Name - the correct abbreviation for "date", etc.
  3418. Offset - signed minutes to add to GMT
  3419.  
  3420. Advantages:
  3421.   This would be faster than posible solution #1.
  3422.  
  3423.   The string can contain any number of changes.
  3424.  
  3425.   Portable (all change times in GMT), and users at sites on site specific
  3426. time can "roll their own".
  3427.  
  3428.   Covers the case where two locations want to use the same abbreviation
  3429. for "their" timezone. Note that this keeps the computer from getting
  3430. confused, not the user.
  3431.  
  3432. Disadvantages:
  3433.   May not be able to handle some future really complex algorithm,
  3434. particularly one based on something like phase of the moon. However, this
  3435. can be updated on a yearly basis.
  3436.  
  3437.   Ugly, hard to read.
  3438.  
  3439. Summary
  3440. -------
  3441.   These are proposals for comment. Since I have not presented them as
  3442. final solutions, technical comments are more useful than raving flames.
  3443. They are not intended to address the problem of what time is used for
  3444. crontab, at, and uucp calls, but I see no reason to think that either
  3445. solution would exacerbate these problems, in fact solution #1 might be set
  3446. to always return local time (and ignore TZ) if the caller was root, bin,
  3447. uucp, etc.
  3448.  
  3449. Volume-Number: Volume 5, Number 56
  3450.  
  3451. From jsq  Sun Feb 23 11:19:24 1986
  3452. From: std-unix%ut-sally.UUCP@SALLY.UTEXAS.EDU (Moderator, John Quarterman)
  3453. Newsgroups: mod.std.unix
  3454. Subject: Re: POSE proposal for TZ
  3455. Message-Id: <4257@ut-sally.UUCP>
  3456. Organization: IEEE/P1003 Portable Operating System Environment Committee
  3457. Date: 23 Feb 86 17:19:07 GMT
  3458. Draft-9: TZ.P.046
  3459.  
  3460. From: seismo!elsie!ado
  3461. Date: Fri, 21 Feb 86 22:48:58 EST
  3462.  
  3463. # To unundle, sh this file
  3464. echo README 1>&2
  3465. cat >README <<'End of README'
  3466. @(#)README    1.4
  3467.  
  3468. The shell archive of which this file is a part contains man pages for functions
  3469. and a file format designed to deal with Daylight Savings Time variations.
  3470.  
  3471. The basic idea is to have a system-wide directory that contains binary files
  3472. describing time zone rules; functions such as "localtime" could read such
  3473. files before doing time conversions.
  3474.  
  3475. A manual page for a "time zone compiler" that turns text-file descriptions of
  3476. time zone rules into binary files is also included, as is a sample input file
  3477. for the compiler.  These would, of course, not be part of the standard;
  3478. they are included here only to show that the binary files that would be used
  3479. under this scheme can be readily created.
  3480.  
  3481. Source code for these functions and for the time zone compiler are available
  3482. from seismo!elsie!ado, the person to whom to direct comments (with, perhaps,
  3483. carbon copes to cbosgd!mark and seismo!philabs!linus!encore!necis!geo,
  3484. who are responsible for any good ideas that show up here).
  3485. End of README
  3486. echo settz.3 1>&2
  3487. cat >settz.3 <<'End of settz.3'
  3488. .TH SETTZ 3 
  3489. .SH NAME
  3490. settz, newctime, newlocaltime \-  convert date and time to ASCII
  3491. .SH SYNOPSIS
  3492. .nf
  3493. .B settz(zonename)
  3494. .B char *zonename;
  3495. .PP
  3496. .B char *newctime(clock)
  3497. .B long *clock;
  3498. .PP
  3499. .B
  3500. #include "time.h"
  3501. .PP
  3502. .B struct tm *newlocaltime(clock)
  3503. .B long *clock;
  3504. .PP
  3505. .B char *tz_abbr;
  3506. .SH DESCRIPTION
  3507. .I Settz
  3508. sets time zone information used by
  3509. .I newctime
  3510. and
  3511. .IR newlocaltime .
  3512. If
  3513. .I zonename
  3514. begins with a slash,
  3515. it is used as the absolute pathname of the
  3516. .IR tzfile (5)-format
  3517. file from which to read the time zone information;
  3518. if
  3519. .I zonename
  3520. begins with some other character,
  3521. it is used as a pathname relative to the standard time zone information
  3522. directory.  A call of the form
  3523. .ti +.5i
  3524. .B
  3525. settz("")
  3526. .br
  3527. causes built-in information about GMT to be used; a call of the form
  3528. .ti +.5i
  3529. .B
  3530. settz((char *) 0)
  3531. .br
  3532. is treated as if it were a call of the form
  3533. .ti +.5i
  3534. .B
  3535. settz("localtime")
  3536. .PP
  3537. .I Newlocaltime
  3538. has the same argument and return value as
  3539. .IR localtime .
  3540. If
  3541. .I newlocaltime
  3542. is called before
  3543. .I settz
  3544. is called,
  3545. .I newlocaltime
  3546. calls
  3547. .I settz
  3548. with the value returned by
  3549. .B
  3550. getenv("TZ").
  3551. .I Newlocaltime
  3552. sets
  3553. tz_abbr
  3554. to a pointer to an 
  3555. ASCII string that's the time zone abbreviation to be used with
  3556. .IR newlocaltime 's
  3557. return value.
  3558. .PP
  3559. .I Newctime
  3560. returns a pointer to a string of the form
  3561. .ti +.5i
  3562. Sat Feb 15 15:45:51 1986 EST\\n\\0
  3563. .br
  3564. where the last (variable-width) field is the time zone abbreviation.
  3565. .SH DIAGNOSTICS
  3566. .I Settz
  3567. returns zero if all seems well; it returns negative one otherwise
  3568. (and sets things up so that its built-in information about GMT is used).
  3569. .SH FILES
  3570. /etc/tzdir    standard time zone information directory
  3571. .SH "SEE ALSO"
  3572. ctime(3), getenv(3), tzfile(5)
  3573. .. @(#)settz.3    1.3
  3574. End of settz.3
  3575. echo tzfile.5 1>&2
  3576. cat >tzfile.5 <<'End of tzfile.5'
  3577. .TH TZFILE 5
  3578. .SH NAME
  3579. tzfile \- time zone information
  3580. .SH SYNOPSIS
  3581. .B
  3582. #include "tzfile.h"
  3583. .SH DESCRIPTION
  3584. The time zone information files used by
  3585. .IR settz (3)
  3586. and
  3587. .IR newlocaltime (3)
  3588. have the format of the
  3589. .I tzinfo
  3590. structure described in the include file
  3591. .B 
  3592. "tzfile.h":
  3593. .sp
  3594. .nf
  3595. .in +.5i
  3596. struct tzinfo {
  3597.     int    tz_timecnt;
  3598.     long    tz_times[TZ_MAX_TIMES];
  3599.     char    tz_types[TZ_MAX_TIMES];
  3600.     struct dsinfo {
  3601.         long    ds_gmtoff;
  3602.         char    ds_abbr[TZ_ABBR_LEN+1];
  3603.         char    ds_isdst;
  3604.     }    tz_dsinfo[TZ_MAX_TYPES];
  3605. };
  3606. .fi
  3607. .PP
  3608. The
  3609. .B tz_timecnt
  3610. field tells how many of the
  3611. .B tz_times
  3612. and
  3613. .B tz_types
  3614. stored in the file are meaningful.
  3615. Each of the meaningful
  3616. .B tz_times
  3617. entries is a starting time (as returned by
  3618. .IR time (2));
  3619. the same-indexed
  3620. .B tz_types
  3621. entry is the index of the
  3622. .B tz_dsinfo
  3623. array element that tells about how "local time" is generated starting at that
  3624. time.
  3625. For a file to be used by
  3626. .IR settz ,
  3627. its
  3628. .B tz_times
  3629. entries must be sorted in ascending order.
  3630. .PP
  3631. In the
  3632. .B tz_dsinfo
  3633. structures,
  3634. .B ds_gmtoff
  3635. gives the number of seconds that should be added to GMT;
  3636. .B ds_abbr
  3637. is the ASCII-NUL-terminated string used as the time zone abbreviation;
  3638. and
  3639. .B
  3640. ds_isdst
  3641. tells whether
  3642. .B
  3643. tm_isdst
  3644. should be set by
  3645. .IR newlocaltime (3).
  3646. .PP
  3647. .I Newlocaltime
  3648. uses the first element of
  3649. .B tz_dsinfo
  3650. if either
  3651. .B tz_timecnt
  3652. is zero or
  3653. .IR newlocaltime 's
  3654. argument is less than
  3655. .BR tz_times[0] .
  3656. .SH SEE ALSO
  3657. settz(3)
  3658. .. @(#)tzfile.5    1.4
  3659. End of tzfile.5
  3660. echo tzcomp.8 1>&2
  3661. cat >tzcomp.8 <<'End of tzcomp.8'
  3662. .TH TZCOMP 8
  3663. .SH NAME
  3664. tzcomp \- time zone compiler
  3665. .SH SYNOPSIS
  3666. .B tzcomp
  3667. [
  3668. .B \-d
  3669. directory ] filename ...
  3670. .SH DESCRIPTION
  3671. .I Tzcomp
  3672. reads text from the file(s) named on the command line
  3673. and creates the time zone information files specified in this input.
  3674. If a
  3675. .I filename
  3676. is
  3677. .BR ` - ',
  3678. the standard input is read.
  3679. .PP
  3680. This option is available:
  3681. .TP
  3682. .B \-d directory
  3683. Create time zone information files in the named directory rather than
  3684. in the standard directory named below.
  3685. .PP
  3686. A sharp characters (#) in the input introduces a comment which extends to
  3687. the end of the line the sharp character appears on.
  3688. Any line which is blank (after comment stripping) is ignored.
  3689. Non-blank lines are expected to be of one of three
  3690. types:  rule lines, zone lines, and link lines.
  3691. .PP
  3692. A rule line has the form
  3693. .nf
  3694. .B
  3695. .ti +.5i
  3696. .ta \w'Rule 'u +\w'MostNA 'u +\w'FROM 'u +\w'1973 'u +\w'TYPE 'u +\w'Apr 'u +\w'lastSun 'u +\w'2:00 'u +\w'SAVE 'u
  3697. .sp
  3698. Rule    NAME    FROM    TO    TYPE    IN    ON    AT    SAVE    LETTER/S
  3699. .sp
  3700. For example:
  3701. .ti +.5i
  3702. .sp
  3703. Rule    MostNA    1969    1973    -    Apr    lastSun    2:00    1:00    D
  3704. .sp
  3705. .fi
  3706. The fields that make up a rule line are:
  3707. .TP
  3708. .B NAME
  3709. Gives the (arbitrary) name of the set of rules this rule is part of.
  3710. .TP
  3711. .B FROM
  3712. Gives the first year in which the rule applies.
  3713. .TP
  3714. .B TO
  3715. Gives the last year in which the rule applies.
  3716. The word
  3717. .RB ` only '
  3718. may be used to repeat the value of the
  3719. .B
  3720. FROM
  3721. field.
  3722. .TP
  3723. .B TYPE
  3724. Gives the type of year in which the year applies.  If
  3725. .B TYPE
  3726. is
  3727. .B
  3728. "-"
  3729. then the rule is taken to apply in all years between
  3730. .B FROM
  3731. and
  3732. .B TO
  3733. inclusive.
  3734. If
  3735. .B TYPE
  3736. is something else, then the command
  3737. .B
  3738. .ti +.5i
  3739. years from to type
  3740. .br
  3741. is executed with arguments
  3742. .IR from ,
  3743. .IR to ,
  3744. and
  3745. .IR type
  3746. taken from the rule line; the rule is taken to apply only in those years
  3747. printed by the
  3748. .I years
  3749. command.
  3750.  
  3751. The distributed
  3752. .I years
  3753. command is a shell script that can handle year types
  3754. .B uspres
  3755. (United States presidential election years)
  3756. and
  3757. .B nonpres
  3758. (all other years);
  3759. other year types may be added by changing the script.
  3760. .TP
  3761. .B IN
  3762. Names the month in which the rule takes effect.  Month names may be
  3763. abbreviated.
  3764. .TP
  3765. .B ON
  3766. Gives the day on which the rule takes effect.
  3767. Recognized forms include:
  3768. .nf
  3769. .in +.5i
  3770. .sp
  3771. .ta \w'lastSun  'u
  3772. 5    the fifth of the month
  3773. lastSun    the last Sunday in the month
  3774. lastMon    the last Monday in the month
  3775. Sun>=8    first Sunday on or after the eighth
  3776. Sun<=25    last Sunday on or before the 25th
  3777. .fi
  3778. .in -.5i
  3779. .sp
  3780. Names of days of the week may be abbreviated or spelled out in full.
  3781. Note that there must be no spaces within the
  3782. .B ON
  3783. field 
  3784. (or within any other field).
  3785. .TP
  3786. .B AT
  3787. Gives the time of day at which the rule takes affect.
  3788. Recognized forms include:
  3789. .nf
  3790. .in +.5i
  3791. .sp
  3792. .ta \w'1:28:13  'u
  3793. 2    time in hours
  3794. 2:00    time in hours and minutes
  3795. 15:00    24-hour format time (for times after noon)
  3796. 1:28:14    time in hours, minutes, and seconds
  3797. .fi
  3798. .in -.5i
  3799. .sp
  3800. .TP
  3801. .B SAVE
  3802. Gives the amount of time to be added to local standard time when the rule is in
  3803. effect.  This field has the same format as the
  3804. .B AT
  3805. field.
  3806. .TP
  3807. .B LETTER/S
  3808. Gives the "variable part" (for example, the 'S' or 'D' in "EST" or "EDT")
  3809. of time zone abbreviations to be used when this rule is in effect.
  3810. If this field is
  3811. .B
  3812. "-",
  3813. the variable part is null.
  3814. .PP
  3815. A zone line has the form
  3816. .sp
  3817. .nf
  3818. .ti +.5i
  3819. .ta \w'Zone 'u +\w'Eastern 'u +\w'GMTOFF 'u +\w'MostNA 'u
  3820. Zone    NAME    GMTOFF    RULES    FORMAT
  3821. .sp
  3822. For example:
  3823. .sp
  3824. .ti +.5i
  3825. Zone    Eastern    -5:00    MostNA    E%sT
  3826. .sp
  3827. .fi
  3828. The fields that make up a zone line are:
  3829. .TP
  3830. .B NAME
  3831. The name of the time zone.
  3832. This is the name used in creating the time zone information file for the zone.
  3833. .TP
  3834. .B GMTOFF
  3835. The amount of time to add to GMT to get standard time in this zone.
  3836. This field has the same format as the
  3837. .B AT
  3838. and
  3839. .B SAVE
  3840. fields of rule lines;
  3841. begin the field with a minus sign if time must be subtracted from GMT.
  3842. .TP
  3843. .B RULES
  3844. The name of the rule(s) that apply in the time zone.
  3845. If this field contains
  3846. .B
  3847. "-"
  3848. then standard time always applies in the time zone.
  3849. .TP
  3850. .B FORMAT
  3851. The format for time zone abbreviations in this time zone.
  3852. The pairs of characters
  3853. .B
  3854. "%s"
  3855. is used to show where the "variable part" of the time zone abbreviation goes.
  3856. .PP
  3857. A link line has the form
  3858. .sp
  3859. .nf
  3860. .ti +.5i
  3861. .ta \w'Link 'u +\w'LINK-FROM 'u
  3862. Link    LINK-FROM    LINK-TO
  3863. .sp
  3864. For example:
  3865. .sp
  3866. .ti +.5i
  3867. Link    Eastern        EST5EDT
  3868. .sp
  3869. .fi
  3870. The
  3871. .B LINK-FROM
  3872. field should appear as the
  3873. .B NAME
  3874. field in some zone line;
  3875. the
  3876. .B LINK-TO
  3877. field is used as an alternate name for that zone.
  3878. .PP
  3879. Lines may appear in any order in the input.
  3880. .SH EXAMPLE
  3881. [Since a sample time zone file appears in the shell archive,
  3882. this section has been omitted.]
  3883. .SH FILES
  3884. /etc/tzdir    standard directory used for created files
  3885. .SH "SEE ALSO"
  3886. settz(3), tzfile(5)
  3887. .. @(#)tzcomp.8    1.4
  3888. End of tzcomp.8
  3889. echo tzinfo 1>&2
  3890. cat >tzinfo <<'End of tzinfo'
  3891. # @(#)tzinfo    1.5
  3892.  
  3893. # Rule    NAME    FROM    TO    TYPE    IN    ON    AT    SAVE    LETTER/S
  3894. Rule    MostNA    1969    1973    -    Apr    lastSun    2:00    1:00    D
  3895. Rule    MostNA    1969    1973    -    Oct    lastSun    2:00    0    S
  3896. Rule    MostNA    1974    only    -    Jan    6    2:00    1:00    D
  3897. Rule    MostNA    1974    only    -    Nov    24    2:00    0    S
  3898. Rule    MostNA    1975    only    -    Feb    23    2:00    1:00    D
  3899. Rule    MostNA    1975    only    -    Oct    26    2:00    0    S
  3900. Rule    MostNA    1976    2037    -    Apr    lastSun    2:00    1:00    D
  3901. Rule    MostNA    1976    2037    -    Oct    lastSun    2:00    0    S
  3902.  
  3903. # Almost surely wrong:
  3904.  
  3905. # Rule    NAME    FROM    TO    TYPE    IN    ON    AT    SAVE    LETTER/S
  3906. Rule    Oz-Eur    1969    1973    -    Apr    lastSun    2:00    1:00    S
  3907. Rule    Oz-Eur    1969    1973    -    Oct    lastSun    2:00    0    -
  3908. Rule    Oz-Eur    1974    only    -    Jan    6    2:00    1:00    S
  3909. Rule    Oz-Eur    1974    only    -    Nov    24    2:00    0    -
  3910. Rule    Oz-Eur    1975    only    -    Feb    23    2:00    1:00    S
  3911. Rule    Oz-Eur    1975    only    -    Oct    26    2:00    0    -
  3912. Rule    Oz-Eur    1976    2037    -    Apr    lastSun    2:00    1:00    S
  3913. Rule    Oz-Eur    1976    2037    -    Oct    lastSun    2:00    0    -
  3914.  
  3915. # New names
  3916.  
  3917. # Zone    NAME        GMTOFF    RULES    FORMAT
  3918. Zone    Atlantic    -4:00    MostNA    A%sT
  3919. Zone    Eastern        -5:00    MostNA    E%sT
  3920. Zone    Central        -6:00    MostNA    C%sT
  3921. Zone    Mountain    -7:00    MostNA    M%sT
  3922. Zone    Pacific        -8:00    MostNA    P%sT
  3923. Zone    Yukon        -9:00    MostNA    Y%sT
  3924. Zone    Hawaiian    -10:00    MostNA    H%sT
  3925. Zone    Newfoundland    -3:30    -    NST
  3926. Zone    Japan        9:00    -    JST
  3927. Zone    WET        0    Oz-Eur    WE%sT
  3928. Zone    MET        1     Oz-Eur    ME%sT
  3929. Zone    EET        2    Oz-Eur    EE%sT
  3930. Zone    AEST        10:00    Oz-Eur    AES%sT
  3931. Zone    ACST        9:30    Oz-Eur    ACS%sT
  3932. Zone    AWST        8:00    -    AWST    # No Daylight Saving here?
  3933.  
  3934. #
  3935. # A settz("") uses the code's built-in GMT without going to disk to get
  3936. # the information.  Still, we want things to work if somebody does a
  3937. # settz("GMT"), so. . .
  3938. #
  3939.  
  3940. Zone    GMT        0    -    GMT
  3941.  
  3942. # Old names
  3943.  
  3944. # Link    LINK-FROM    LINK-TO
  3945. Link    Eastern        EST5EDT
  3946. Link    Central        CST6CDT
  3947. Link    Mountain    MST7MDT
  3948. Link    Pacific        PST8PDT
  3949.  
  3950. # "Pacific Presidential Election Time" is being contemplated in Congress
  3951.  
  3952. # Rule    NAME    FROM    TO    TYPE    IN    ON    AT    SAVE    LETTER/S
  3953. Rule    Twilite    1969    1973    -    Apr    lastSun    2:00    1:00    D
  3954. Rule    Twilite    1969    1973    -    Oct    lastSun    2:00    0    S
  3955. Rule    Twilite    1974    only    -    Jan    6    2:00    1:00    D
  3956. Rule    Twilite    1974    only    -    Nov    24    2:00    0    S
  3957. Rule    Twilite    1975    only    -    Feb    23    2:00    1:00    D
  3958. Rule    Twilite    1975    only    -    Oct    26    2:00    0    S
  3959. Rule    Twilite    1976    2037    -    Apr    lastSun    2:00    1:00    D
  3960. Rule    Twilite    1976    1987    -    Oct    lastSun    2:00    0    S
  3961. Rule    Twilite    1988    2037    uspres    Oct    lastSun    2:00    1:00    PE
  3962. Rule    Twilite    1988    2037    uspres    Nov    Sun>=7    2:00    0    S
  3963. Rule    Twilite    1988    2037    nonpres    Oct    lastSun    2:00    0    S
  3964.  
  3965. # Zone    NAME        GMTOFF    RULES    FORMAT
  3966. Zone    New-Pacific    -8:00    Twilite    P%sT
  3967.  
  3968. # Next really belongs in a separate file
  3969.  
  3970. Link    Eastern        localtime
  3971. End of tzinfo
  3972. exit
  3973. --
  3974.     UUCP: ..decvax!seismo!elsie!ado    ARPA: elsie!ado@seismo.ARPA
  3975.     DEC, VAX and Elsie are Digital Equipment and Borden trademarks
  3976.  
  3977. Volume-Number: Volume 5, Number 57
  3978.  
  3979. From jsq  Sun Feb 23 11:40:51 1986
  3980. From: std-unix%ut-sally.UUCP@SALLY.UTEXAS.EDU (Moderator, John Quarterman)
  3981. Newsgroups: mod.std.unix
  3982. Subject: Re: POSE proposal for TZ
  3983. Message-Id: <4258@ut-sally.UUCP>
  3984. Organization: IEEE/P1003 Portable Operating System Environment Committee
  3985. Date: 23 Feb 86 17:40:38 GMT
  3986. Draft-9: TZ.P.046
  3987.  
  3988. Date: Sat, 22 Feb 86 21:14:28 cst
  3989. From: ihnp4!uiucdcs!ccvaxa!aglew@SEISMO.CSS.GOV (Andy Glew)
  3990.  
  3991. I do not know if double daylight savings has ever been used, 
  3992. but I heard a man from Canada's NRC talking about it on CBC radio last year.
  3993. The NRC is hoping that the US will go to DST earlier and stay later,
  3994. and from that it is only a short step to double time.
  3995. This makes better sense the closer you get to the pole.
  3996. I do know that several industries in Britain in WWII went to effective
  3997. double daylight savings time, by having people report to work earlier
  3998. in deepest summer (which is what we should do anyway).
  3999.  
  4000. What's all the fuss about, anyway? All times should be recorded in GMT,
  4001. since it's the closest thing we have to a standard clock.
  4002. Timezone information should only be used for local printing of the time
  4003. - dates, ls, etc. For this, the environment variable would be useful.
  4004.  
  4005. [ Several people have described what the problems are at length.
  4006. Since it's been a while, naturally there are people just starting
  4007. to follow the discussion who missed its beginning.  Perhaps I should
  4008. repost one of the explanatory articles.  So, a small poll:  If you've
  4009. come in late and want to know what all the fuss is about, send me
  4010. a note.  If you've been following the discussion all along and remember
  4011. a particular specification of the problem which was most clear to you,
  4012. let me know.  If I get enough of the former I will repost an
  4013. explanatory article, possibly chosen according to the latter.  -mod ]
  4014.  
  4015. Timestamps MUST be recorded in GMT, for projects that exchange code across
  4016. timezones.
  4017.  
  4018. [ The UNIX kernel has always kept internal time in GMT, as have most
  4019. other operating systems (VMS seems to be an exception).  There are,
  4020. however, programs which write text timestamps in local time.  -mod ]
  4021.  
  4022. It is conceivable that knowing what time of his local day the author last
  4023. modified his code might be useful, but instead of carrying a timezone
  4024. indication, why not carry a true location around, like latitude/longitude,
  4025. and look that up in a database (although it might get hairy for spaceships
  4026. travelling near c :-).
  4027.  
  4028. [ Timezones change per latitude and longitude. -mod ]
  4029.  
  4030. Even hairier idea:  have we considered non-24 hour days? Someday, someone is
  4031. going to have computers on the moon; they may still be running UNIX (and
  4032. Fortran, and Cobol) at that time, and there's no guarantee that they'll
  4033. stick to a 24 hour day. There've been a lot of studies that show that men
  4034. in isolation go to a 28-30 hour cycle, and without the sun rising to keep
  4035. you in synch, there's no reason not to change the definition of "day".
  4036. GMT will probably still be kept, but local time takes on a whole new meaning.
  4037. Maybe just leave an escape in any timezone environment variable for
  4038. local time conversions that don't simply consist of adding an offset?
  4039.  
  4040. [ Doubtless it will happen, but probably not within the effective
  4041. life of the current P1003 proposed standard.  I suggest the new
  4042. INFO-FUTURES list for such discussions.  I will repost the announcement
  4043. from UNIX-WIZARDS for it as the next article.  -mod ]
  4044.  
  4045. Andy "Krazy" Glew. Gould CSD-Urbana. 
  4046. UUCP: ...!ihnp4!uiucdcs!ccvaxa!aglew
  4047. ARPA Internet: aglew@gswd-vms.ARPA
  4048.  
  4049. [ PS:  Other than interpolating comments, there are exactly two things
  4050. which I can't resist doing to submitted articles before posting them
  4051. and without asking their authors first:  fixing obviously incorrect
  4052. spelling; and fixing incorrect network addresses, like UUCP addresses
  4053. given as being for USENET or old-style ARPANET addresses which won't
  4054. work anywhere in the ARPA Internet where domain nameservers are in use.
  4055. -mod ]
  4056.  
  4057. Volume-Number: Volume 5, Number 58
  4058.  
  4059. From jsq  Sun Feb 23 11:48:17 1986
  4060. From: std-unix%ut-sally.UUCP@SALLY.UTEXAS.EDU (Moderator, John Quarterman)
  4061. Newsgroups: mod.std.unix
  4062. Subject: Announcement of INFO-FUTURES
  4063. Message-Id: <4259@ut-sally.UUCP>
  4064. Organization: IEEE/P1003 Portable Operating System Environment Committee
  4065. Date: 23 Feb 86 17:48:01 GMT
  4066. Draft-9: INFO-FUTURES
  4067.  
  4068. [ The following is reposted from UNIX-WIZARDS.  -mod ]
  4069.  
  4070. From: bzs%bostonu.csnet@csnet-relay.arpa (Barry Shein)
  4071. Date: 17 Feb 86 18:56:14 GMT
  4072.  
  4073.  
  4074.  
  4075.  INFO-FUTURES        Sunday February 16, 1986    Volume 1 Number 1
  4076.  
  4077.   Purpose: To provide a speculative forum for analyzing current and
  4078.   likely events in technology as they will affect our near future in
  4079.   computing and related areas.
  4080.  
  4081.     This is a moderated list, submissions should be sent to:
  4082.  
  4083.         ARPA:    info-futures%bu-cs@csnet-relay.ARPA
  4084.         CSNET:    info-futures@bu-cs
  4085.         UUCP:    ...harvard!bu-cs!info-futures
  4086.  
  4087.     Membership and address changes to info-futures-request
  4088.  
  4089. ---------------------------------------------------------------------------
  4090.  
  4091.              ANNOUNCEMENT OF INFO-FUTURES
  4092.  
  4093. This list has been formed to fill a need that appeared to not really
  4094. be served by any existing list. Although the topics it addresses are
  4095. often touched upon in almost every other major forum the goal is to
  4096. provide a place for more eclectic and speculative discussions
  4097. generally discouraged in technical newsgroups. The original discussion
  4098. for formation of this list occurred among readers of the unix-wizards
  4099. mailing list, the desire for such a forum seemed obvious. I hope the
  4100. source of participation spreads far beyond the original discussions
  4101. from which this list was founded.
  4102.  
  4103. In broad terms, topics of interest include developments in both
  4104. computing research and industry which are likely to affect our
  4105. decision making, particularly decisions we are probably grappling with
  4106. right this minute. Technologies can change so rapidly that simply
  4107. forecasting for needs within any organization one or two years in
  4108. advance can be extremely difficult, frequently we are forced to
  4109. provide foundations that effectively lock us into a technology for
  4110. longer periods of time. I would hope the information this list
  4111. provides can help both the practitioner and researcher determine where
  4112. best to expend resources.
  4113.  
  4114. It is difficult, probably impossible, to separate what is often termed
  4115. 'politics' or 'religion' from facts in such a discussion.  Those that
  4116. believe in a particular future and proceed to implement it will often
  4117. find their prophecies to be self-fulfilling, it will become their
  4118. future and the future of those whom they influence.  My only hope is
  4119. that, through moderation, we can provide a steady flow of information
  4120. who's content is apparent and useful. I have never felt uncomfortable
  4121. with people who are excited about their ideas.
  4122.  
  4123. Feel free to post this announcement on other bulletin boards.
  4124.  
  4125.         Moderator
  4126.         Barry Shein
  4127.         Boston University
  4128.  
  4129. Volume-Number: Volume 5, Number 59
  4130.  
  4131. From jsq  Mon Feb 24 09:26:50 1986
  4132. From: std-unix%ut-sally.UUCP@SALLY.UTEXAS.EDU (Moderator, John Quarterman)
  4133. Newsgroups: mod.std.unix
  4134. Subject: Re: TZ yet again
  4135. Message-Id: <4264@ut-sally.UUCP>
  4136. References: <4239@ut-sally.UUCP>
  4137. Organization: IEEE/P1003 Portable Operating System Environment Committee
  4138. Date: 24 Feb 86 15:26:38 GMT
  4139. Draft-9: TZ
  4140.  
  4141. Date: Sun, 23 Feb 86 23:54:47 PST
  4142. From: seismo!s3sun!sdcsvax!sdcsvax.UCSD.EDU!allyn (Allyn Fratkin)
  4143.  
  4144. In article <4239@ut-sally.UUCP>, davidsen@steinmetz.UUCP (Davidsen) writes:
  4145. >   One method of solving these problems would be to use the value of TZ as
  4146. > the name of a file in a special directory. These files would be
  4147. > executable, and given the current date and time in GMT would return the
  4148. > number of minutes to be added to GMT for that timezone (obviously the
  4149. > return value is signed).
  4150.  
  4151. Problem here: on most unix systems the parent only gets the lower eight
  4152. bits of the exit value.  This would mean max/min values of 127/-128.
  4153. Not very practical if the value is supposed to be in minutes.
  4154. Fine if the return value is in hours, though, but then you're still 
  4155. leaving parts of the world out.  Besides, we've pretty much decided that
  4156. we should at least have precision in minutes.
  4157.  
  4158. Of course, we could make the precision HALF-hours.  This is kind of silly,
  4159. but is there anywhere in the world whose time is not an integral number of
  4160. half hours away from GMT?
  4161.  
  4162. [ The canonical example is Saudi Arabia, which has other problems, too. -mod ]
  4163.  
  4164. By the way, I definitely feel that we need both a per-system time zone
  4165. and a per-process (or per-user) time zone.  Machines are stationary,
  4166. but users are mobile (and sometimes far away).
  4167.  
  4168. (I imagine that timezone is not in the dictionary because its not a word).
  4169.  
  4170. [ Is filesystem a word?  -mod ]
  4171.  
  4172. -- 
  4173.  From the virtual mind of Allyn Fratkin            allyn@sdcsvax.ucsd.edu    or
  4174.                           UCSD EMU/Pascal Project  {ucbvax, decvax, ihnp4}
  4175.                           U.C. San Diego                         !sdcsvax!allyn
  4176.  
  4177.  "Generally you don't see that kind of behavior in a major appliance."
  4178. -- 
  4179. Allyn Fratkin                    allyn@sdcsvax.ucsd.edu
  4180. UCSD EMU/Pascal Project          or
  4181. U.C. San Diego                   {ucbvax, decvax, ihnp4}!sdcsvax!allyn
  4182.  
  4183. Volume-Number: Volume 5, Number 60
  4184.  
  4185. From jsq  Tue Feb 25 22:02:30 1986
  4186. From: std-unix%ut-sally.UUCP@SALLY.UTEXAS.EDU (Moderator, John Quarterman)
  4187. Newsgroups: mod.std.unix
  4188. Subject: Re: POSE proposal for TZ
  4189. Message-Id: <4284@ut-sally.UUCP>
  4190. References: <4257@ut-sally.UUCP>
  4191. Organization: IEEE/P1003 Portable Operating System Environment Committee
  4192. Date: 26 Feb 86 04:02:15 GMT
  4193. Draft-9: TZ.P.046
  4194.  
  4195. From: Jack Jansen <seismo!mcvax!jack>
  4196. Date: 25 Feb 86 20:56:12 N (Tue)
  4197. Organization: AMOEBA project, CWI, Amsterdam
  4198.  
  4199. Well, even though the discussion doesn't seem to have anything
  4200. to do with standardising, it *is* interesting.
  4201.  
  4202. [ Comments on how to handle timezones are explicitly requested
  4203. in an appendix of the current P1003 draft.  -mod ]
  4204.  
  4205. I like the outside of elsie!ado's proposal, but I think the
  4206. implementation could be done more simple and cheap.
  4207.  
  4208. First (not too important), if you go for binary files, you
  4209. shouldn't put two arrays of fixed size in the beginning.
  4210. This will inevitably mean trouble for future generation. If you
  4211. *do* insist on binary data, make it variable sized array, and
  4212. put a count in.
  4213.  
  4214. Second, and most important, I think the method is far too complex
  4215. for its achievements. I think something along the following
  4216. lines would work as easy, and be much simpler to set up:
  4217. - view normal time and dst as *different* timezones. If a certain
  4218.   area has had more than one dst offset since written history(jan70),
  4219.   see those as different too. Note that different timezones could
  4220.   have the same name.
  4221. - Per timezone, keep a list with transition-times, and new timezones.
  4222. - Further, use a scheme along the lines of elsie!ado's proposal, so
  4223.   use files in a specified directory, and use a link to get the
  4224.   local default time.
  4225. Now, two typical files would look like:
  4226. /etc/tz/FOT:
  4227.     # FOT - Far Out Time.
  4228.     FOT    +11:28        # Offset from GMT
  4229.     Apr 1, 1970    FST
  4230.     Apr 1, 1971    FST
  4231.     Apr 1, 1972    FST.1972
  4232.     ...
  4233. /etc/tz/FST:
  4234.     # FST - Far out Summer Time.
  4235.     # Differs by 1:10 hour from FST.
  4236.     FST    +12:38
  4237.     Sep 1, 1970    FOT
  4238.     ...
  4239. /etc/tz/FST.1972:
  4240.     # FST.2 - Far out Summer Time exceptional situation for 1972.
  4241.     # Differs 1:11 hour from FOT.
  4242.     FST    +12:39
  4243.     Sep 1, 1972    FOT
  4244. Note that these files should be in binary, of course, and transition
  4245. times in order of ascending magnitude.
  4246. Also, if you do a settz("FST"), and present a date in november,
  4247. a quick binary search will immedeately get you to the Sep 1 transition,
  4248. and get you to the right timezone. Note that this will *also* work for
  4249. timezones with the same names: the name in col. 2 of the files, and in
  4250. the settz() call, are filenames, and the first entry in the file is
  4251. the name that will be used on output.
  4252.  
  4253. --
  4254.     Jack Jansen, jack@mcvax.UUCP
  4255.     The shell is my oyster.
  4256.  
  4257. Volume-Number: Volume 5, Number 61
  4258.  
  4259. From jsq  Wed Feb 26 10:57:08 1986
  4260. From: std-unix%ut-sally.UUCP@SALLY.UTEXAS.EDU (Moderator, John Quarterman)
  4261. Newsgroups: mod.std.unix
  4262. Subject: Re: POSE proposal for TZ
  4263. Message-Id: <4293@ut-sally.UUCP>
  4264. Organization: IEEE/P1003 Portable Operating System Environment Committee
  4265. Date: 26 Feb 86 16:56:45 GMT
  4266. Draft-9: TZ.P.046
  4267.  
  4268. From: seismo!hao!asgb!devine (Bob Devine)
  4269. Date: Tue, 25 Feb 86 19:58:51 mst
  4270.  
  4271.   First of all, sorry for the length of this article.  I've been
  4272. doing job search type of things the last week.
  4273.  
  4274.   It appears that this will be my last posting from this site.
  4275. The Burroughs Distributed Systems Group was severely cut for budget
  4276. reasons.  The uucp site "asgb" (it stood for Advanced Systems Group,
  4277. Boulder) will soon be no more.  In fact, there are only a few
  4278. terminals left attached to any VAX.  Our site officially closed
  4279. a week and a half ago.
  4280.  
  4281.   There has been many responses to my proposal for the handling
  4282. of timezones and Daylight Saving Time rules.  Let me respond to
  4283. them according to subject.  However, let me first reiterate the
  4284. important ideas presented in my proposal of a month ago:
  4285.  
  4286.     1. a single timezone definition exists for that system;
  4287.        this definition is the default
  4288.  
  4289.     2. timezone and DST rules are kept and passed as
  4290.        environment variables
  4291.     
  4292.     3. a user (or program) can override the default definition
  4293.  
  4294.   The above can be considered a "cleaned-up" way of handling timezone
  4295. compared to AT&T System III and V.  DST handling is just an analogous
  4296. extension to this.  I proposed this method to deal with the coming
  4297. UNIX usage throughout the world.  Specifically, the product line we
  4298. were developing used UNIX and was to be offered everywhere Burroughs
  4299. does business.  
  4300.  
  4301.   My proposal's biggest (and intended) limitation is its inability to
  4302. deal with past years at all.  To do that requires a table of such
  4303. changes as elsie!ado's proposes.  However, after I started collecting
  4304. such rules and saw that they numbered in the thousands I decided for
  4305. the simpler proposal.  If anyone wants to, they can see my collection
  4306. gathered from a person from the DOT, someone at the National Bureau of
  4307. Standards, and several publications from the American Federation of
  4308. Astrologers.  However, any collection becomes old quickly.  For example,
  4309. China just this month started using 4 timezones instead of the one
  4310. centered on Bejing.
  4311.  
  4312.   On to the criticisms and questions:
  4313.  
  4314. 1. Format of proposed DST variable.  Are 0 or 2 changes per year
  4315.    sufficient? (Chris Torek, Mark Horton and Andy Glew)
  4316.    I believe so for all places __currently__.  The only places that
  4317.    I have found to use Double Summer Time are:
  4318.        Argentina     1924 and 1969
  4319.        Azores        1942 (unclear)
  4320.        France        some areas 1940-42
  4321.              everywhere 1943-46 and 1976-77
  4322.        Great Britain 1941-47
  4323.        Portugal      1942
  4324.        Spain         1942-1946
  4325.        Tunisia       194x (unclear)
  4326.  
  4327.    If Double Summer Time is in modern use, four changes can be put
  4328.    into the DST variable.  Re-reading my response to Chris Torek,
  4329.    I see that I was unclear.  I wrote that no rules would "violate the
  4330.    assumptions" made for the DST variable.  What was not clear was
  4331.    the assumption that 4 changes could be used.
  4332.  
  4333. 2. Numerals, '-', or '+' in timezone names. (Chris Torek and Mark Horton)
  4334.    I don't know.  Does anyone have a list of legal timezone names
  4335.    and abbreviations (if any) as used by each country?  I have English
  4336.    equivalents for some.  The TZ variable can be modified to use
  4337.    field separator characters between the names and offset from UT.
  4338.    A note: the sign used for the offset should match ISO standards,
  4339.    which is the opposite of System V conventions.  Sorry, I don't have
  4340.    the ISO document number than details this; it's in a box somewhere.
  4341.  
  4342. 3. "/etc/TIMEZONE" is too specific.  Use functions. (Guy Harris)
  4343.    For the purpose of P1003, Guy is right.  To avoid the confusion
  4344.    of all new CTIME(3C) functions, the existing functions should be
  4345.    kept though with modifications.  A problem lurks in the use of
  4346.    the ctime() function where programs copy the returned string into
  4347.    a too short array.
  4348.  
  4349. 4. Proposed TZ format is too unlike Sys V's. (Guy Harris)
  4350.  
  4351.    System V's use of difference is hours is just plain wrong for
  4352.    many places (eg., Dominican Republic, Iran, and Saudi Arabia
  4353.    where local custom dictates midnight is when the sun sets).
  4354.    I proposed using just minutes.  Guy proposes the form "[+/-]H[:m]"
  4355.    where "H" is hours and "m" is minutes.  It's a matter of choice.
  4356.    It may be preferable to use seconds to be on the safe side.
  4357.  
  4358.  
  4359. 5. Who puts TZ and DST into a user's environment? (Guy Harris)
  4360.  
  4361.    The easy answer is "whatever puts TZ there now".  It is an OS
  4362.    specific mechanism.  "login" could do it or a user's login shell
  4363.    upon starting up could do it.  I didn't specify in the proposal.
  4364.  
  4365.  
  4366. 6. What about utilities not run by a logged-in user? (Guy Harris)
  4367.  
  4368.    Such utilities should only have to use a library call to obtain
  4369.    the timezone name (if desired) and the local time.
  4370.  
  4371.  
  4372. 7. Use files to hold information about that timezone.
  4373.    (steinmetz!davidsen and ncr-sd!greg (Greg Noel))
  4374.  
  4375.    Using a file with the name of a timezone won't work for Daylight
  4376.    Saving Time rules because one timezone may span multiple countries
  4377.    with its named unchanged (eg., Canada and USA) yet the countries may
  4378.    have different rules for daylight saving time.  Furthermore, within
  4379.    one country, not all areas within a timezone use DST the same way
  4380.    (eg., Indiana, Arizona).  A two dimensional grid of timezones and
  4381.    countries might be possible but this would probably get unwieldy quickly.
  4382.    For users of network file systems and diskless workstations: beware,
  4383.    proximity does not imply same rules (for a bad dream, think of a network
  4384.    that spans a timezone where there is only one file server and the rest
  4385.    of the nodes are diskless -- this contrived example is hard to solve
  4386.    with any proposal).
  4387.    The second point is that the name of the timezone has to be known
  4388.    somehow -- both the default timezone and, if the user selects one,
  4389.    the non-system name.  This brings to mind an easy solution of
  4390.    environment variables.
  4391.  
  4392.  
  4393.   Let me close with the requirements, as I see them, for the handling of
  4394. timezone and DST information.  It might be better to debate these instead
  4395. of any specific proposals.
  4396.  
  4397. 1. every site must have default information on its timezone and for DST rules
  4398. 2. information about the past, while it may be needed in some situations,
  4399.    is not essential
  4400. 3. information about other timezones and areas, while it may be needed
  4401.    in some situations, is not essential
  4402. 4. a user (or program) should be allowed to change the timezone and DST
  4403.    information for their use only
  4404. 5. because the local time conversion is used often, it should be fast
  4405. 6. changes to the system-default information should be easy to make
  4406.  
  4407. So long,
  4408. Bob Devine
  4409. (home phone: 303/772-2410)
  4410.  
  4411. Volume-Number: Volume 5, Number 62
  4412.  
  4413. From jsq  Thu Feb 27 19:50:17 1986
  4414. From: std-unix%ut-sally.UUCP@SALLY.UTEXAS.EDU (Moderator, John Quarterman)
  4415. Newsgroups: mod.std.unix
  4416. Subject: Re: POSE proposal for TZ
  4417. Message-Id: <4323@ut-sally.UUCP>
  4418. References: <4293@ut-sally.UUCP>
  4419. Organization: IEEE/P1003 Portable Operating System Environment Committee
  4420. Date: 28 Feb 86 01:50:05 GMT
  4421. Draft-9: TZ.P.046
  4422.  
  4423. Date: Thu, 27 Feb 86 15:11:34 PST
  4424. From: seismo!sun!guy (Guy Harris)
  4425.  
  4426. >   My proposal's biggest (and intended) limitation is its inability to
  4427. > deal with past years at all.
  4428.  
  4429. You *intended* to make "ctime" only work on times in the current year?  This
  4430. is extremely undesirable.  Every UNIX out there can deal with this now, and
  4431. people have probably written code that depends on being able to do so.  That
  4432. code won't work on a system which doesn't support this.
  4433.  
  4434. > 4. Proposed TZ format is too unlike Sys V's. (Guy Harris)
  4435. >    System V's use of difference is hours is just plain wrong for
  4436. >    many places (eg., Dominican Republic, Iran, and Saudi Arabia
  4437. >    where local custom dictates midnight is when the sun sets).
  4438. >    I proposed using just minutes.  Guy proposes the form "[+/-]H[:m]"
  4439. >    where "H" is hours and "m" is minutes.  It's a matter of choice.
  4440.  
  4441. It is not in the least "a matter of choice".  For one thing, I'd rather let
  4442. the computer do the multiplication of 8 by 60 instead of being forced to do
  4443. it myself; computers are good at that sort of thing.  For another, my
  4444. proposal is an *upward compatible extension* to the System V syntax (which,
  4445. BTW, the item in the System V Interface Definition under "Future
  4446. Directions", where the number in TZ becomes a four-digit value of the form
  4447. "hhmm", does not seem to be).  Your proposal is not an upward compatible
  4448. extension to the System V syntax, as it involves changing the time zone
  4449. offset to minutes - i.e., EST5EDT is no longer correct.  There have already
  4450. been enough incompatible changes to UNIX by several groups with the intent
  4451. of "improving" it (Berkeley's CSRG and AT&T's USDL have both done their
  4452. share of this); let's try to keep that sort of thing to a minimum in the
  4453. future.  (I.e., don't always take the first solution to a problem that comes
  4454. to mind, or even the most aesthetically pleasing solution; sacrificing some
  4455. think time or some aesthetic merit for compatibility is almost always the
  4456. right thing to do.)
  4457.  
  4458. >    It may be preferable to use seconds to be on the safe side.
  4459.  
  4460. Given that most clocks used in everyday situations aren't accurate to the
  4461. second, the chances of a timezone offset being specified to the second are
  4462. somewhere between slim and none, unless you have an offset from UTC
  4463. specified to the second due to something like not picking up a leap second
  4464. (which I sincerely doubt anybody does).  Specifying the offset down to the
  4465. second is overkill (note that 4.2BSD's "gettimeofday" system call fills in a
  4466. structure which specifies the offset to the minute; a commendable example of
  4467. restraint).
  4468.  
  4469. > 5. Who puts TZ and DST into a user's environment? (Guy Harris)
  4470. >    The easy answer is "whatever puts TZ there now".  It is an OS
  4471. >    specific mechanism.  "login" could do it or a user's login shell
  4472. >    upon starting up could do it.  I didn't specify in the proposal.
  4473. > 6. What about utilities not run by a logged-in user? (Guy Harris)
  4474. >    Such utilities should only have to use a library call to obtain
  4475. >    the timezone name (if desired) and the local time.
  4476.  
  4477. In this case, the library call in question had better be part of the
  4478. standard.  I presume by "the local time" you really meant "the local
  4479. timezone offset and the daylight savings time rules for that zone".  As
  4480. such, since this implies there is a "default" time zone, why not have all
  4481. the routines use this time zone if TZ is not specified in the environment?
  4482. That way, 1) programs don't have to "know" that they're going to be run in
  4483. such an environment and have the extra calls to get the "default" timezone
  4484. information added, and 2) you don't have to bother sticking TZ in the
  4485. environment unless you want to work in a timezone other than the default.
  4486.  
  4487. > 7. Use files to hold information about that timezone.
  4488. >    (steinmetz!davidsen and ncr-sd!greg (Greg Noel))
  4489. >    Using a file with the name of a timezone won't work for Daylight
  4490. >    Saving Time rules because one timezone may span multiple countries
  4491. >    with its named unchanged...
  4492.  
  4493. Arthur Olson's proposal does not require the file's name to be the same as
  4494. the zone.  The zone's name is computed from information in the file.
  4495.  
  4496. >    For users of network file systems and diskless workstations: beware,
  4497. >    proximity does not imply same rules (for a bad dream, think of a network
  4498. >    that spans a timezone where there is only one file server and the rest
  4499. >    of the nodes are diskless -- this contrived example is hard to solve
  4500. >    with any proposal).
  4501.  
  4502. No, it isn't.  Here's how it could be solved, given the way Sun
  4503. sets up diskless clients:
  4504.  
  4505.     Have the "default time zone" be specified in a file (whether the
  4506.     file is a "profile" file which puts it in the environment, or
  4507.     a file which is read in by the "get default timezone" routine,
  4508.     or whatever is irrelevant) which is, say, in "/etc".  Make it
  4509.     a symbolic link to a file in "/private/etc".  "/private", on Sun
  4510.     systems, is a small private file system on the server; each client
  4511.     has one of its own, to hold things like "/etc/rc.boot" which sets
  4512.     the host name for the machine.  Sharing this file between all clients
  4513.     obviously won't work, so the precedent for configuration files for
  4514.     diskless workstations which can't be shared by all clients of its
  4515.     server is already established.
  4516.  
  4517. >    The second point is that the name of the timezone has to be known
  4518. >    somehow -- both the default timezone and, if the user selects one,
  4519. >    the non-system name.  This brings to mind an easy solution of
  4520. >    environment variables.
  4521.  
  4522. It may be easy, but it's not a solution, unless you can stuff this default
  4523. timezone into the environment of every process on the system.  And if you do
  4524. so in N different places, as System V currently does, it may be a solution
  4525. but it's not easy.
  4526.  
  4527. >   Let me close with the requirements, as I see them, for the handling of
  4528. > timezone and DST information.  It might be better to debate these instead
  4529. > of any specific proposals.
  4530.  
  4531. If we're going to debate the requirements, let's not see any specific
  4532. proposals until the requirements are settled, so we don't have to shoot down
  4533. proposals which either don't meet the requirements or which are more complex
  4534. than is needed to meet the requirements (or both!).
  4535.  
  4536. > 1. every site must have default information on its timezone and for DST
  4537. >    rules
  4538.  
  4539. Every *host* must have this information, as you pointed out in the example
  4540. of the diskless workstatiions.
  4541.  
  4542. > 2. information about the past, while it may be needed in some situations,
  4543. >    is not essential
  4544. > 3. information about other timezones and areas, while it may be needed
  4545. >    in some situations, is not essential
  4546.  
  4547. Would you please explain the distinction between "needed" and "essential"?
  4548. If it is truly "needed" in some situations, as opposed to "useful", it's
  4549. "essential" unless the system can do without a P1003-compatible system.
  4550.  
  4551. > 4. a user (or program) should be allowed to change the timezone and DST
  4552. >    information for their use only
  4553.  
  4554. 4 1/2. a consequence of this is that a program must be able to override
  4555.        any setting the user has made and get the default timezone for 
  4556.        that machine
  4557.  
  4558. Volume-Number: Volume 5, Number 63
  4559.  
  4560. From jsq  Fri Feb 28 09:42:53 1986
  4561. From: std-unix%ut-sally.UUCP@SALLY.UTEXAS.EDU (Moderator, John Quarterman)
  4562. Newsgroups: mod.std.unix
  4563. Subject: TZ suggestion (clarification)
  4564. Message-Id: <4327@ut-sally.UUCP>
  4565. Organization: IEEE/P1003 Portable Operating System Environment Committee
  4566. Date: 28 Feb 86 15:42:28 GMT
  4567. Draft-9: TZ
  4568.  
  4569. Date: Thu, 27 Feb 86 11:05:13 est
  4570. From: Davidsen <seismo!rochester!steinmetz!davidsen@sally.UTEXAS.EDU>
  4571.  
  4572. When I used the term "returned value" in reference to the method of executing
  4573. timezone programs, I assumed use of a pipe as a posibility to get an
  4574. indefinite quantity of info back from the process. Thanks to Allyn Fratkin for
  4575. requesting clarification (or mentioning the need for it).
  4576.  
  4577. Volume-Number: Volume 5, Number 64
  4578.  
  4579. From jsq  Sat Mar  1 17:31:45 1986
  4580. From: std-unix%ut-sally.UUCP@SALLY.UTEXAS.EDU (Moderator, John Quarterman)
  4581. Newsgroups: mod.std.unix
  4582. Subject: localtime(), ctime() and timezones
  4583. Message-Id: <4347@ut-sally.UUCP>
  4584. Organization: IEEE/P1003 Portable Operating System Environment Committee
  4585. Date: 1 Mar 86 23:31:29 GMT
  4586. Draft-9: TZ
  4587.  
  4588. Date: 02 Mar 86 05:47:32 +1100 (Sun)
  4589. From: Robert Elz <munnari!kre@SEISMO.CSS.GOV>
  4590.  
  4591. It seems to me that this discussion is getting a bit overblown,
  4592. as far as P1003 is concerned, it doesn't really seem to be
  4593. as difficult or complex as some people are making out.
  4594.  
  4595. So, I'm going to propose something that could be inserted into
  4596. P1003 (with the obvious extra definitions that I'm going to
  4597. leave out on the assumption that everyone knows what they are,
  4598. like the definition of a "struct tm").
  4599.  
  4600. In some words of other, it would go like this (with hopefully
  4601. a lot of cleaning up of the typography to get rid of quotes
  4602. and things like that where I would really prefer to use italics
  4603. or bold):
  4604.  
  4605. Implementations shall provide the following functions:
  4606.  
  4607.     struct tm *gmttime(t) time_t *t;
  4608.     struct tm *localtime(t) time_t *t;
  4609.     int settz(p) char *p;
  4610.     char *asctime(tp) struct tm *tp;
  4611.     char *ctime(t) time_t *t;
  4612.  
  4613. gmttime: converts the time_t "*t" to a "struct tm" representing
  4614. the same time (in Universal Co-ordinated Time).  (waffle about
  4615. the returned value being in a static area, etc, goes here).
  4616.  
  4617. localtime: converts the time_t "*t" to a "struct tm" representing
  4618. the given time adjusted to represent some local time difference.
  4619. "local time" will be specified by a call to "settz", if no such
  4620. call has preceded the call to localtime(), localtime() will call
  4621. "settz(getenv("TZ"));".  Implementors should note that for any defined
  4622. past time (from midnight January 1, 1970 until the time the call is made)
  4623. the local time returned should be accurate (taking into account the effects
  4624. of daylight saving, if any).  For future times, the local time returned
  4625. should be as likely to be accurate as current projections of
  4626. future timezone rules and daylight saving time changes allow.
  4627.  
  4628. settz: enables users to specify the local time conversion to be
  4629. used by localtime.  The string is an implementation specific
  4630. representation of the timezone offset desired, with 2 special
  4631. cases..  The null pointer (t == (char *)0) will always select
  4632. the appropriate local time offset for the host executing the call.
  4633. A null string (t != (char *)0 && *t == '\0') will select
  4634. no local time transformations (making localtime() equivalent
  4635. to gmttime()).  Implementations should provide, and document,
  4636. some mechanism to allow users to select another timezone.
  4637. This mechanism is beyond the scope of the standard.  Implementors
  4638. should, if possible, allow users to define their own timezones,
  4639. and not restrict them to use one of some standard set.
  4640. If settz is called with an unrecognisable argument, the effect
  4641. is implementation defined.  (Users might expect any of three
  4642. "reasonable"? actions could be taken here -- use GMT, use local time,
  4643. or use local time in the area where the implementation was performed).
  4644. settz returns 0 if the timezone selected could be obtained, and
  4645. -1 otherwise.  settz can be called as many times as needed, each
  4646. call affects future calls of localtime, until another call to settz.
  4647.  
  4648. acstime: returns a 25 character string representing the time
  4649. specified by "*tp".  The format of the string is ... (you all know it).
  4650.  
  4651. ctime: is defined to be "asctime(localtime(t))".
  4652.  
  4653. ...................
  4654.  
  4655. Notes: this is (about) the right level of detail for the standard.
  4656. There is no need to specify what the form of the argument to
  4657. settz() is.  This enables things like the Sys V "EST5EDT" string,
  4658. and Arthur Olson's (elsie!ado) "localtime" "Eastern" etc, to all
  4659. be used with impunity - the implementor gets to choose whatever
  4660. is appropriate to him - just provided that he can satisfy the
  4661. needs of his customers (implementors who provide no means of getting
  4662. daylight saving right in the Southern hemisphere can probably
  4663. expect not to sell many copies there - but that's their choice).
  4664.  
  4665. In particular - this discourages programmers from writing programs
  4666. which "know" what the local time should be - there's no reason at
  4667. all why a program should ever need to do more than select GMT,
  4668. host local time, or a user specified time zone.  (nb: while localtime
  4669. uses the TZ environment variable in cases where the program has made
  4670. no call to settz(), there's nothing to stop a program getting the
  4671. argument to settz() from anywhere it pleases, including from several
  4672. different environment variables if it chooses, and needs to operate
  4673. in several timezones, or from an external configuration file, or
  4674. wherever is appropriate).
  4675.  
  4676. This works for existing programs (in general) - localtime() performs
  4677. the required call to settz() the first time it is called (directly
  4678. or via ctime()).  There's no need to worry about who sets TZ, if
  4679. its not set, getenv("TZ") will return (char *)0 and settz() will
  4680. then use the appropriate local time for the host.  How settz()
  4681. gets that information is an implementation matter.  The security
  4682. problems (people faking local time for programs that expect it
  4683. to be host local time, by setting TZ before running the program)
  4684. can easily solved by causing those (comparatively few) programs
  4685. to do "settz((char *)0)" before their first call to localtime().
  4686.  
  4687. What's missing:  So far here there is no mention of the "timezone name".
  4688. None of the standard mechanisms is really adequate here.  The V7
  4689. (and 4.xbsd) "timezone" function is clearly inadequate (although
  4690. 4.2 bsd allows users to set the environment variable TZNAME to anything
  4691. they like) since there can clearly be several possible names for the
  4692. same offset, and "timezone" has no way to discover which one is wanted.
  4693. Requiring the name to resice in the environment somewhere (Sys V) is also
  4694. inadequate (there are too many problems about making sure it is set
  4695. in all the right places).
  4696.  
  4697. Arthur Olson's scheme causes "localtime" to set a global variable
  4698. "tz_abbr" to the correct string name for the timezone just used.
  4699. I can't think of any cases where anything more than this is needed,
  4700. but it is less flexible then "timezone()" and it would require
  4701. programs that currently call timezone() to have to be altered.
  4702. (He also has his version of "ctime" (but not "asctime") include
  4703. the timezone in its output - I doubt if that is feasible for P1003,
  4704. too many existing programs know what every byte in the returned
  4705. string from ctime() contains.)
  4706.  
  4707. I solicit suggestions for what to do here - one might be to
  4708. retain "timezone" but not require that it be capable of returning
  4709. anything except the zone name corresponding to the last call of
  4710. localtime() - then with ado's implementation it could simply
  4711. ignore its arguments and return tz_abbr - I suspect that would
  4712. satisfy all existing uses (and the ones it doesn't are quite
  4713. likely not to work in general anyway).  Opinions?
  4714.  
  4715. There's also no discussion of how this relates to processes
  4716. and images.  Not because there's anything doubtful here,
  4717. but just because the necessary words take a lot of space.
  4718. (informally, "the first call to localtime" is intended to
  4719. be "the first after the program is exec'd, ignoring any
  4720. fork()'s it may have since performed, as long as there
  4721. has been no subsequent exec).  Getting this kind of thing
  4722. right is essential for a standatds document, its not essential
  4723. here.
  4724.  
  4725. ...................
  4726.  
  4727. A justification for all this ...  Today, just about 2 1/2 hours ago
  4728. (it's early on a Sun morning as I write this) the daylight saving
  4729. rules changed in at least 2 Australian states (no-one really seems
  4730. very sure of what happened, or really why).  The politicians gave
  4731. us less than a month's warning that it was coming (and the month
  4732. was February, which isn't a long month...).
  4733.  
  4734. If there's anyone who doesn't believe that some form of dynamic
  4735. timezone setting is required, they're welcome to come to Australia
  4736. and suffer our local politicians (this isn't the first time: a
  4737. couple of years ago New South Wales decided to extend daylight
  4738. saving for a month to try and save on power bills - the amount of
  4739. notice given was about the same - at that time, at least one local
  4740. site decided to scrap running on GMT and run on localtime (ala VMS)
  4741. instead.  They're still doing that, I think, and suffering because
  4742. of it).
  4743.  
  4744. I'm extremely grateful that Arthur Olson decided to try an implementation,
  4745. and donate it to the community - he made the task of converting things here
  4746. much easier than it otherwise would have been.  His implementation
  4747. meets the above specs (in fact, it inspired them...), and will work
  4748. for all the contorted exampes that people have been proposing (multiple
  4749. shifts in a year, multi-hour saving, even daylight wasting).
  4750.  
  4751. But note - there's no need for the standard to require this
  4752. generality, market pressures will do that - all the standard
  4753. needs to do is supply a suitable interface.  Arthur Olson's
  4754. implementation proves that the above reccomendation is
  4755. implementable (munnari is running his code, in libc, right now)
  4756. and effecient enough.
  4757.  
  4758. [ Your last sentence gives the reason that I've encouraged
  4759. discussions of implementations in the newsgroup:  it's good
  4760. to know that a proposed standard is implementable and handles
  4761. actual cases.  But you're right, of course, that the
  4762. P1003 standard doesn't need implementation details.  -mod ]
  4763.  
  4764. Jack Jansen's (mcvax!jack) somewhat similar, but slightly different scheme
  4765. would probably work just as well.
  4766.  
  4767. Bob Devine's (hao!asgb!devine) "I don't think its needed" attitude
  4768. can also fit the standard - if he's right then he's probably going
  4769. to have a very fast localtime() which will serve him well.
  4770. If he's wrong, then he's not going to get many customers.
  4771.  
  4772. That's good - the more the better - that gives us users (or us system
  4773. implementors perhaps) a wide choice of methods.
  4774.  
  4775. Robert Elz        kre%munnari.oz@seismo.css.gov    seismo!munnari!kre
  4776.  
  4777. Volume-Number: Volume 5, Number 65
  4778.  
  4779. From jsq  Thu Mar  6 11:13:01 1986
  4780. From: std-unix%ut-sally.UUCP@SALLY.UTEXAS.EDU (Moderator, John Quarterman)
  4781. Newsgroups: mod.std.unix
  4782. Subject: Daylight Time Survey Summary
  4783. Message-Id: <4377@ut-sally.UUCP>
  4784. Organization: IEEE/P1003 Portable Operating System Environment Committee
  4785. Date: 6 Mar 86 17:12:15 GMT
  4786. Draft-9: TZ.Daylight.Time
  4787.  
  4788. Date: Tue, 4 Mar 86 16:02:04 PST
  4789. From: Snoopy <seifert%hammer.uucp@CSNET-RELAY.ARPA>
  4790.  
  4791. Once upon a time, I posted a survey, asking which method people
  4792. would prefer for allowing a user to override the system default
  4793. timezone.  I suggested a ~/.daterc file, and/or environment variables.
  4794.  
  4795. I received 15 replies.  The summary of votes is:
  4796.  
  4797.         environment variables        -  4 votes
  4798.         either                -  3 votes
  4799.         "not ~/.daterc"            -  1 vote
  4800.         use GMT for everything        -  1 vote
  4801. "take it out of the kernel and put it in libc"    -  1 vote
  4802.         other                -  1 vote
  4803.         misunderstandings        -  4 (at least)
  4804.  
  4805. A number of people were concerned with performance, since lots of
  4806. programs use timestamps.  They were concerned that opening a file
  4807. would slow things down.
  4808.  
  4809. Some selected replies, edited for brevity:
  4810. ------------------------------------
  4811. From: ihnp4!cbosgd!cbpavo.cbosgd.ATT.UUCP!mark
  4812.  
  4813. System V has a default (which always
  4814. seems to be the time zone of the developers of the system, so that
  4815. the developers will never find any bugs that only show up in non-default
  4816. time zones) and overrides it with the TZ environment variable.  This
  4817. has some horrible properties:
  4818.  
  4819.   (1) People who don't use the Bourne shell, and hence don't source
  4820.       /etc/profile, don't get a TZ.  This includes csh and uucico.
  4821.   (2) Programs run from crontab don't get a TZ.
  4822.   (3) Programs run single user don't get a TZ.
  4823.   (4) An individual can change his TZ to defraud the system.  For
  4824.       example, a UUCP L.sys may restrict a certain long distance
  4825.       call to night hours, but by setting your time zone to some
  4826.       far off part of the world, you can dial out during the day.
  4827.  
  4828. [...]
  4829.  
  4830.    (1) "time right now" must be fast for logging
  4831.    (2) "time of some date this year" should be reasonably fast for ls -l.
  4832.    (3) "time of some date some previous year" can be slow.
  4833.  
  4834.     Mark
  4835. ----------------------------------
  4836. From: hp-pcd!hp-sdd!sdcsvax!bmcg!asgb!devine
  4837.  
  4838.   My choice looks like:
  4839.  
  4840.     $TZ=MST-7    # name of timezone and difference from Univeral Time
  4841.     $DST=1        # how much to adjust for DST; ==0 if no DST is used
  4842.     $DST_START=(when daylight saving starts)
  4843.     $DST_STOP=(when daylight saving stops)
  4844.  
  4845. Bob Devine
  4846. Burroughs / Boulder, CO.
  4847. -------------------------------
  4848. From: sequent!riacs!seismo!ut-sally!cyb-eng!howard
  4849.  
  4850. Whatever happened to the concepts of dynamic linking, true interprocess
  4851. communication, and "lightweight processes"?  If your operating system
  4852. is frozen or hostile and you care about D.S.T., then dynamically loading
  4853. a library module might be appropriate.  If the o.s. is frozen/hostile and
  4854. you don't care, use something like "/etc/daterc" which can be overridden
  4855. by $TZ.  If you're writing/modifying an o.s., consider dynamically-loaded,
  4856. reentrant library routines and memory management hardware to support it.
  4857. Of course, a more practical o.s. approach would be to have a date server:
  4858. just set up a socket to your favorite date-server port and go get it.
  4859.  
  4860. ------------------------------------
  4861. From: tektronix!allegra!clyde!watmath!utzoo!ecrhub!ecr1!peterc
  4862.  
  4863. In studying this problem a while ago, I found I needed three environment
  4864. variables.  They could have been encoded into one, of course, but that
  4865. makes it harder for the user to set up right.  I found the following
  4866. were necessary:
  4867.  
  4868. TIMEZONE:  a comma-separated list of the time zones that apply.
  4869.         e.g. TIMEZONE=EST,EDT
  4870. TIMEDIFF:  a comma-separated list of the number of minutes west of GMT (east if
  4871.         negative) the corresponding time zone is.
  4872.         e.g. TIMEZONE=480,540
  4873. TIMECHG:   a comma-separated list of the dates on which time changes occur.
  4874.         It is assumed that at midnight on January 1st each year, we
  4875.         are in the initial time zone (e.g. EST), and then progress
  4876.         through the others in sequence, then backwards to the original.
  4877.         The time change dates are specified in the form
  4878.             mm/dd+n
  4879.         where "mm" is the month (1-12), "dd" is the day (1-31), and
  4880.         the "+n" (or "-n") causes that date to be moved forward
  4881.         (backward) to the appropriate day of the week (e.g. 4/24+0
  4882.         means the first Sunday on or after April 24th).
  4883.  
  4884. I prefer environment variables for reasons of speed.  However, the current
  4885. UNIX scheme is not adequate, for several reasons:
  4886.     - it does not provide the flexibility needed, because everything
  4887.         is hard-coded.
  4888.     - it does not satisfy the real-world requirements.  In particular,
  4889.         it does not take into account things like the double
  4890.         daylight savings time used in much of Europe.
  4891.  
  4892. Even the scheme I propose here is not really adequate, because it only accounts
  4893. for the current year, which may not be suitable for other years.  A more general
  4894. scheme could be built by adding special cases for unusual years:
  4895.  
  4896.     TIMECHG=4/24+0,10/25+0;1974-1975:.....;.....
  4897.  
  4898. I.e. make the first set of values (up to the first ';') the rule that applies
  4899. in the current year, and any other unspecified year.  Then add special cases
  4900. for other years.
  4901.  
  4902. All this starts to get complex, ugly and unpleasant to set up and program.
  4903. That is the way it is.  Sir Stanford Fleming established a wonderful system
  4904. when he defined Standard Time.  I hope he didn't expect it to stay that way.
  4905.  
  4906. ------------------------------
  4907. This is getting prettty long, so I'll describe what I'm actually doing in
  4908. a future article.
  4909.  
  4910. Snoopy
  4911. tektronix!tekecs!doghouse.TEK!snoopy
  4912.  
  4913. Volume-Number: Volume 5, Number 66
  4914.  
  4915. From jsq  Fri Mar  7 10:30:39 1986
  4916. From: std-unix%ut-sally.UUCP@SALLY.UTEXAS.EDU (Moderator, John Quarterman)
  4917. Newsgroups: mod.std.unix
  4918. Subject: Re: localtime(), ctime() and timezones
  4919. Message-Id: <4381@ut-sally.UUCP>
  4920. References: <4347@ut-sally.UUCP>
  4921. Organization: IEEE/P1003 Portable Operating System Environment Committee
  4922. Date: 7 Mar 86 16:30:16 GMT
  4923. Draft-9: TZ
  4924.  
  4925. Date: 6 Mar 86 23:09:30 EST (Thu)
  4926. From: floyd!opus!ka@SEISMO.CSS.GOV (Kenneth Almquist)
  4927. Organization: Bell Labs, Holmdel, NJ
  4928.  
  4929. I basicly agree with Robert Elz.  A few comments:
  4930.  
  4931. 1)  I suggest adding an entry for the timezone name to the tm
  4932. structure.  Something like
  4933.  
  4934.     char tm_zone[6];
  4935.  
  4936. I expect that time zone names will not exceed 5 characters, although
  4937. the size of this array need not be specified in the standard.  I don't
  4938. suggest making tm_zone a character pointer because if that were done
  4939. any implementation would be complicated by the need to ensure that
  4940. tm_zone was still valid after settz was called with a different time
  4941. zone.
  4942.  
  4943. 2)  The routine name is gmtime, not gmttime.
  4944.  
  4945. 3)  Removing the explicit mention of a time zone directory from the
  4946. standard means that there is no longer a way to find the offset of time
  4947. zone that a time zone name represents.  How about providing a routine
  4948. to do this:
  4949.  
  4950.     long tzoffset(tzname)  char *tzname;
  4951.  
  4952. which takes a time zone name and returns the offset of that time zone
  4953. in seconds with respect to GMT?
  4954.                 Kenneth Almquist
  4955.                 ihnp4!houxm!hropus!ka    (official name)
  4956.                 ihnp4!opus!ka        (shorter path)
  4957.  
  4958. Volume-Number: Volume 5, Number 67
  4959.  
  4960. From jsq  Sat Mar  8 14:15:53 1986
  4961. From: std-unix%ut-sally.UUCP@SALLY.UTEXAS.EDU (Moderator, John Quarterman)
  4962. Newsgroups: mod.std.unix
  4963. Subject: time conversion
  4964. Message-Id: <4387@ut-sally.UUCP>
  4965. Organization: IEEE/P1003 Portable Operating System Environment Committee
  4966. Date: 8 Mar 86 20:15:39 GMT
  4967. Draft-9: TZ
  4968.  
  4969. Date: Sat, 8 Mar 86 13:14:34 EST
  4970. From: elsie!ado@SEISMO.CSS.GOV
  4971.  
  4972. Source for the time zone compiler discussed here earlier has been posted to
  4973. mod.sources.  The new posting incorporates changes suggested by net readers:
  4974.  
  4975. *    "newctime" now returns a pointer to a string of exactly the
  4976.     same form as that returned by "ctime"--no time zone abbreviation
  4977.     appended.
  4978.  
  4979. *    the format of "time zone information files" has been changed so that
  4980.     the files can hold descriptions of arbitrarily large size.
  4981.  
  4982. I agree with munnari!kre--certainly the P1003 standard ought not require
  4983. conforming implementations to provide exhaustive time conversion capabilities;
  4984. kre's note about what the standard actually might look like is a good starting
  4985. place.  Still, the standard ought to allow folks to do arbitrary time
  4986. conversion if they want to; the mod.sources posting should provide both an idea
  4987. of just how arbitrary governments have been (and can be expected to be) in
  4988. defining "local time," and an idea of the sort of mechanism that would be
  4989. required to deal with this arbitrariness.
  4990. --
  4991.     UUCP: ..decvax!seismo!elsie!ado        ARPA: elsie!ado@seismo.ARPA
  4992.     DEC, VAX, Elsie & Ado are Digital, Borden & Shakespeare trademarks.
  4993.  
  4994. Volume-Number: Volume 5, Number 68
  4995.  
  4996. From jsq  Sun Mar  9 21:10:27 1986
  4997. From: std-unix%ut-sally.UUCP@SALLY.UTEXAS.EDU (Moderator, John Quarterman)
  4998. Newsgroups: mod.std.unix
  4999. Subject: Re: Daylight Time
  5000. Message-Id: <4396@ut-sally.UUCP>
  5001. Organization: IEEE/P1003 Portable Operating System Environment Committee
  5002. In-Reply-To: <4377@ut-sally.UUCP>
  5003. Date: 10 Mar 86 03:10:09 GMT
  5004. Draft-9: TZ.Daylight.Time
  5005.  
  5006. Date: Sat, 8 Mar 86 13:26:00 pst
  5007. From: <trwrb!desint!geoff> (Geoff Kuenning)
  5008. Organization: SAH Consulting, Manhattan Beach, CA
  5009.  
  5010. Hey, you guys, don't forget us futurists!  In particular, I have the
  5011. following problem to solve, which is why I'm following this discussion:
  5012.  
  5013.     In 'at', I have to be able to figure out the GMT equivalent of an
  5014.     arbitrary date/time pair for the future.
  5015.  
  5016. So please, please, don't simply disregard the future in your suggestions.
  5017.  
  5018. [ But please try to keep it relevant to the current P1003 Trial Use standard
  5019. or the upcoming Full Use one.  E.g., let's keep relativity out of it.  -mod ]
  5020. -- 
  5021.  
  5022.     Geoff Kuenning
  5023.     {hplabs,ihnp4}!trwrb!desint!geoff
  5024.  
  5025. Volume-Number: Volume 5, Number 69
  5026.  
  5027. From jsq  Tue Mar 18 16:47:31 1986
  5028. From: std-unix%ut-sally.UUCP@SALLY.UTEXAS.EDU (Moderator, John Quarterman)
  5029. Newsgroups: mod.std.unix
  5030. Subject: guest moderator
  5031. Message-Id: <4450@ut-sally.UUCP>
  5032. Organization: IEEE/P1003 Portable Operating System Environment Committee
  5033. Date: 18 Mar 86 22:47:13 GMT
  5034. Draft-9: mod.std.unix
  5035.  
  5036. I will be away the rest of the week in California for the USENIX board meeting.
  5037. The guest moderator meawhile will be John B. Chambers, who returns tomorrow
  5038. from a USENIX program committee meeting in California.  Have fun, John....
  5039.  
  5040. Volume-Number: Volume 5, Number 70
  5041.  
  5042. From jsq  Mon Mar 24 15:10:03 1986
  5043. From: std-unix%ut-sally.UUCP@SALLY.UTEXAS.EDU (Moderator, John Quarterman)
  5044. Newsgroups: mod.std.unix
  5045. Subject: Thanks g.m.; End of Volume 5
  5046. Message-Id: <4516@ut-sally.UUCP>
  5047. Organization: IEEE/P1003 Portable Operating System Environment Committee
  5048. Date: 24 Mar 86 21:09:52 GMT
  5049. Draft-9: mod.std.unix
  5050.  
  5051. Well, I think John did an emminently succesful job with all
  5052. the submissions he received while I was gone (i.e., none).
  5053. He liked it so much he's volunteered to do it again while
  5054. I'm away at the Florence P1003 meeting in April.
  5055.  
  5056. This is the last article of Volume 5.
  5057.  
  5058. Volume-Number: Volume 5, Number 71
  5059.  
  5060.