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
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
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
10-30-2006 11:12 AM
10-30-2006 11:12 AM
TZ=
My inquiry is concerning the failure of TZ= following the time change this past weekend.
We recently upgraded a couple of machines from 11.0 to 11.11 and noticed that 11.11 came
with the new tz table for the 2007 date changes for time.
On our 11.0 machines TZ=PST8PDT+24 date +%A wields yesterday's full name day of the week.
It had worked on the 11.11 machines as well until this past weekend.
Now, I am not advocating using TZ= as I have described. I am simply curious as to whay this would
stop working.
Of course if I set the offset to 24, it appears to wroke as previously noted,
i.e. TZ=PST24PDT date +%A.
Has anyone encountered this?
Regards,
DL
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-30-2006 12:17 PM
10-30-2006 12:17 PM
Re: TZ=
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.
Thus, you should beware when trying to perform such trickery as you describe.
A rigorous, safe method to find the day as it was 24-hours ago in your local timezone is:
# perl -MPOSIX -le 'print strftime(%A,localtime(time-(24*60*60)))'
You can use any of the 'strftime(3C)' formatting directives you want.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-30-2006 02:02 PM
10-30-2006 02:02 PM
Re: TZ=
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-31-2006 03:48 AM
10-31-2006 03:48 AM
Re: TZ=
As I stated "I do not condone using this method for date calculations."
My curiosity is in why it changed in execution.
Thank you for the input.
A. Clay -
No question in the value of using caljd.sh. (For those forum'ers that have not used it, it is strongly suggested to investigate.)
My question was straight forward and granted, yes, any use of this in the past may have been pure luck in results. Thus my insistance on not advocating it.
Hopefully, further input on this will be even more enlightening on the change in execution.
Regards,
-dl
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-01-2006 09:28 AM
11-01-2006 09:28 AM
Re: TZ=
the TZ= information a viable means of date/time calculation.
I can only assume that the lack of additional input is a confirmation of the above.
Thank you James and A. Clay for at least attempting a reasonable explanation for
what I was asking.
Regards,
-dl