From: Mark Borges <mdb@cdc.noaa.gov>
To: ZSH users mailing list <zsh-users@math.gatech.edu>
Subject: offset calendar days
Date: Fri, 29 Sep 1995 15:08:05 -0600 [thread overview]
Message-ID: <9509292108.AA02931@revelle.cdc.noaa.gov> (raw)
[ I apologize for this not being a strictly zsh question, but I've
exhausted my other resources, and as a last resort am tapping the
expertise of this list. ]
I'd like to retrieve a calendar date offset in the future (or past). I
vaguely remembered one could do this by fiddling with the TZ
environment variable, but I don't know how to interpret the [+-]N
argument. For instance,
$ TZ=MST7MDT date
Fri Sep 29 14:50:17 MDT 1995
$ TZ=MST7MDT-1 date
Fri Sep 29 21:50:22 MDT 1995 # why didn't I get 15:50 here?
OK, maybe it isn't hours:
$ TZ=MST7MDT-24 date
Sat Sep 30 20:51:13 MDT 1995
$ TZ=MST7MDT-48 date
Sun Oct 1 20:51:16 MDT 1995
$ TZ=MST7MDT-72 date
Mon Oct 2 20:51:22 MDT 1995 # but this seems to indicate it is
$ TZ=MST7MDT-18 date # using 18 gives me tomorrow at this time
Sat Sep 30 14:50:41 MDT 1995
$ TZ=MST7MDT-36 date
Sun Oct 1 08:50:55 MDT 1995
Anyone have any ideas or pointers? (I've checked our man pages for
date, time, timezone, stime, ctime, looked in
/usr/share/lib/zoneinfo/, and came up empty).
Thanks,
-mb-
reply other threads:[~1995-09-29 21:14 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9509292108.AA02931@revelle.cdc.noaa.gov \
--to=mdb@cdc.noaa.gov \
--cc=zsh-users@math.gatech.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).