home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / sys / sun / admin / 5979 < prev    next >
Encoding:
Internet Message Format  |  1992-08-31  |  2.2 KB

  1. Path: sparky!uunet!auspex-gw!guy
  2. From: guy@Auspex.COM (Guy Harris)
  3. Newsgroups: comp.sys.sun.admin
  4. Subject: Re: MDT error converting to Zulu
  5. Message-ID: <14377@auspex-gw.auspex.com>
  6. Date: 31 Aug 92 17:27:16 GMT
  7. References: <1992Aug31.161623.6205@fcom.cc.utah.edu>
  8. Sender: news@auspex-gw.auspex.com
  9. Organization: Auspex Systems, Santa Clara
  10. Lines: 42
  11. Nntp-Posting-Host: bootme.auspex.com
  12.  
  13. > To identify the current file, I use the "date -u" command to provide 
  14. >date and time in Greenwitch mean time (Zulu). However, all of our systems 
  15. >are set to Mountain Daylight Time (MDT) which estimates Zulu time one-
  16. >hour ahead.
  17.  
  18. The reason why "date -u" would give an incorrect value for UTC would be
  19. if the system's clock were set incorrectly.  All "date" does, when
  20. invoked with the "-u" flag, is:
  21.  
  22.     1) get the system time with "gettimeofday()"; the system time
  23.        is, on a properly-set-up system, kept in UTC.
  24.  
  25.     2) convert that time (represented as seconds+microseconds since
  26.        January 1, 00:00 UTC, 1970) to
  27.        day+month+year+hour+minute+second UTC.
  28.  
  29.     3) print it out.
  30.  
  31. If "date" is run with the "-u" flag, it pays no attention whatsoever to
  32. the time zone for the system, as it doesn't have to.
  33.  
  34. UNIX systems don't get set to daylight as opposed to standard time; they
  35. get set up with a particular set of rules for switching between standard
  36. and daylight time (either by setting the TZ environment variable, or by
  37. setting a variable in the kernel, or by making a "localtime" link to the
  38. appropriate time zone file).
  39.  
  40. If your site is at a location where 1) Mountain Time is the timezone and
  41. 2) you observe DST according to the standard US rules, you should have
  42. the system set up for that.  In the case of SunOS 4.x, that's done by
  43. having the "localtime" link be a link to
  44. "/usr/share/lib/zoneinfo/US/Mountain"; do "zic -l US/Mountain", as
  45. "root", to do that.  (In SunOS 5.x, I think it's done by putting
  46. "TZ=:US/Mountain" in "/etc/TIMEZONE".)
  47.  
  48. Then, once you've done that, type "date"; if the time isn't the correct
  49. local time, then your system's clock is set wrong (which would explain
  50. why you were getting answers that were off by an hour).  Set it
  51. correctly.
  52.  
  53. The system will *not* require that you change the date when daylight
  54. savings time goes into effect, or when it goes out of effect.
  55.