1847836 Members
5962 Online
104021 Solutions
New Discussion

Re: tomorrow's date

 
VWR Admin
Advisor

tomorrow's date

how can I display tomorrow's date? I'm sure this was asked for before. In fact I'm sure I did it before but yesterday's are gone from my memory! Thanks,
no one knows as much as all of us!
5 REPLIES 5
Patrick Wallek
Honored Contributor

Re: tomorrow's date

Do a search thru the Forums and look for A. Clay Stephenson's caljd.sh or caljd.pl script.
David_246
Trusted Contributor

Re: tomorrow's date

Or for Europian sites :

TOMORROW=`TZ=$TZ-24 date '+%Y/%m/%d'`

Regs David
@yourservice
Christian Gebhardt
Honored Contributor
James R. Ferguson
Acclaimed Contributor

Re: tomorrow's date

The use of the following is commonly seen to compute tomorrow's date:

# TZ=GMT-24 date +%m/%d/%y

...and "correspondingly", yesterdays's date"

# TZ=GMT+24 date +%m/%d/%y

Eurpopeans,living around the Prime Meridian are the "lucky" ones who can use +-24 hours to exactly compute yesterday or tommorrow *including* the correct time.

As noted by the man pages for environ(5), the offset is the value that must be added to local time to arrive at UTC (GMT). The offset takes the format hh[:mm[:ss]] where(hh)is any value from 0 through 23. The optional minutes (mm) and seconds (ss) fields are a value from 0 through 59. The hour field is required. If offset is preceded by a -, the time zone is east of the Prime Meridian. A + preceding offset indicates that the time is one that is west of the Prime Meridian.

For example, it is now about 1221 hours on March 11 in the Eastern US. To produce a date *and time* exactly 24-hours from now, I would need to compute an offset of (24-5) to account for the difference in my timezone (EST) and UTC time.

Notice that I cannot produce an exact date and time for yesterday, however, since to affect this, the computation would need to offset 29 hours (24+5), an invalid offset.

You are advised to beware.

Regards!

...JRF...
Adam J Markiewicz
Trusted Contributor

Re: tomorrow's date

Tomorrow's date? That's easy:
March 12, 2003
;D
(Well, I see more cleaver guyz gave you the help already...)

Good luck
Adam
I do everything perfectly, except from my mistakes