Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

GNU date difference?

2 views
Skip to first unread message

Paul D. Smith

unread,
Nov 5, 2000, 12:06:16 AM11/5/00
to
On Solaris and other UNIXen I was able to use this little trick to get
_tomorrows_ date, and it always worked:

$ TZ=EST5EDT-24 date +%d

The output of this, if today is 05 Nov, would be "06".

On my Debian Linux box, using shellutils 2.0i (Debian package 2.0i-1),
this doesn't work:

$ TZ=EST5EDT-24 date +%d
05

Same day. In fact, I can add or subtract any value from the timezone in
TZ, and I always get back today's date.

I realize I could do something like "date --date=tomorrow +%d", but
that's not very portable.

Is the TZ trick not portable, either, or is this a missing feature in
GNU date, or what?

Thx.

--
-------------------------------------------------------------------------------
Paul D. Smith <psm...@baynetworks.com> HASMAT--HA Software Methods & Tools
"Please remain calm...I may be mad, but I am a professional." --Mad Scientist
-------------------------------------------------------------------------------
These are my opinions---Nortel Networks takes no responsibility for them.

0 new messages