home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.questions
- Path: sparky!uunet!charon.amdahl.com!pacbell.com!iggy.GW.Vitalink.COM!cs.widener.edu!dsinc!gvls1!jabber!candle!root
- From: root@candle.uucp (Bruce Momjian)
- Subject: Re: Tomorrow's date? (Utility?)
- Organization: a consultant's basement
- Distribution: comp.unix.shell
- Date: Wed, 18 Nov 1992 01:26:01 GMT
- Message-ID: <1992Nov18.012601.17779@candle.uucp>
- X-Newsreader: TIN [version 1.1 PL6]
- References: <1992Nov16.231545.10656@cheshire.oxy.edu>
- Lines: 26
-
- Linda A. Malcor (legend@cheshire.oxy.edu) wrote:
- : I'm looking for a (standard) unix utility that can tell me what tommorow's
- : date is (as well as the date 15hrs in the future/past, etc.). Any ideas?
- : Date math is so common, I'd just like to avoid reinventing the wheel.
- :
-
- You can set the TZ environment variable ( defined in /etc/TIMEZONE ) on
- the command line before calling 'date'. For example, I am in the
- Eastern Time zone, so my TIMEZONE file says:
-
- # established Sun Apr 5 09:55:46 EDT 1992
- TZ=EST5EDT
- export TZ
-
- I am +5 hours from GMT, to to get tommorow's date, I use (-24 + 5) or -19,
- like this:
-
- TZ=EST-19EDT date
-
- and I get the time and date exactly 24 hours in the future. The export TZ
- is not needed.
- --
- Bruce Momjian | 830 Blythe Avenue
- root%candle.uucp@bts.com | Drexel Hill, Pennsylvania 19026
- + If your life is a hard drive, | (215) 353-9879(w)
- + Christ can be your backup. | (215) 853-3000(h)
-