- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: tomorrow's date
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2003 08:54 AM
03-11-2003 08:54 AM
tomorrow's date
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2003 08:57 AM
03-11-2003 08:57 AM
Re: tomorrow's date
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2003 09:02 AM
03-11-2003 09:02 AM
Re: tomorrow's date
TOMORROW=`TZ=$TZ-24 date '+%Y/%m/%d'`
Regs David
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2003 09:03 AM
03-11-2003 09:03 AM
Re: tomorrow's date
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2003 09:21 AM
03-11-2003 09:21 AM
Re: 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...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2003 09:23 AM
03-11-2003 09:23 AM
Re: tomorrow's date
March 12, 2003
;D
(Well, I see more cleaver guyz gave you the help already...)
Good luck
Adam