home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / os / linux / 25280 < prev    next >
Encoding:
Text File  |  1993-01-24  |  2.2 KB  |  52 lines

  1. Newsgroups: comp.os.linux
  2. Path: sparky!uunet!usc!rpi!batcomputer!theory.TC.Cornell.EDU!cloos
  3. From: cloos@theory.TC.Cornell.EDU (James H. Cloos Jr.)
  4. Subject: Re: NON-FAQ - date: CST instead of GMT?
  5. In-Reply-To: vera@fanaraaken.Stanford.EDU's message of 24 Jan 93 01:24:47 GMT
  6. Message-ID: <1993Jan24.065939.6639@tc.cornell.edu>
  7. Sender: news@tc.cornell.edu
  8. Nntp-Posting-Host: theory.tc.cornell.edu
  9. Organization: Cornell Theory Center
  10. References: <1993Jan23.060826.16026@wuecl.wustl.edu>
  11.     <vera.727838687@fanaraaken.Stanford.EDU>
  12. Distribution: na
  13. Date: Sun, 24 Jan 1993 06:59:39 GMT
  14. Lines: 36
  15.  
  16. ASK> This question was asked recently, but was left
  17. ASK> unanswered/misunderstood:
  18.  
  19. ASK> I am having problems with date returning my time in CST vs GMT.
  20. ASK> For example, if the correct time is 23:00 CST: I would try
  21. ASK> typing: date -s "23:00 CST" and then date outputs: Sun Jan 24
  22. ASK> 05:00:00 GMT 1993, the time correctly specified as GMT, but I
  23. ASK> can't get date to output "23:00 CST".  Is there a way to do this,
  24. ASK> or do I just have to live with seeing either the time in GMT or
  25. ASK> the local time specified as GMT?
  26.  
  27. JSV> I fixed this by creating a link from /usr/lib/zoneinfo/localtime
  28. JSV> to the appropriate timezone file (in my case
  29. JSV> /usr/lib/zoneinfo/US/Pacific)
  30.  
  31. Additionally, if for any reasone you do not want to do that/cannot do
  32. that, setting the TZ environmental variable will also do the trick.
  33.  
  34. If TZ=CST6CDT, for instance, you would be at GMT-6, except during US
  35. daylight time, when you would be at GMT-5.  Linking
  36. /usr/lib/zoneinfo/localtime to /usr/lib/zoneinfo/US/Central will do
  37. the same thing.  I recomend using a symbolic link, though, so that the
  38. setting is obvious.  It is often good to also link posixrules to
  39. localtime w/in /usr/lib/zoneinfo, so that any POSIX compliant software
  40. that needs to know the local timezone will work.
  41.  
  42. P.S.    What is the difference between US/Pacific and US/Pacific-new?
  43.     Is it a difference in the daylight savings period?
  44.  
  45. -JimC
  46. -- 
  47. James H. Cloos, Jr.    include <std/qotd>
  48. Cloos@TC.Cornell.EDU    include <std/disclaimers.h>
  49. Cloos@Batcomputer.UUCP     Snail:  POBox 1111, Amherst, NY 14226-1111
  50. Cloos@CrnlThry.BITNET     Phone:  +1 716 673-1250 (voice only, for now)
  51.  
  52.