GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Date and Julian Date on HP-UX 10.20
Operating System - HP-UX
1848310
Members
7822
Online
104024
Solutions
Forums
Categories
Company
Local Language
back
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
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- 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:25 AM
03-11-2003 08:25 AM
I would like to know the following things.
1. How to see Yesterday date on HP-UX 10.20. Is there any scripts available to see back dates?.
2. How to see Julian date.
Thanks,
Thirumalai
1. How to see Yesterday date on HP-UX 10.20. Is there any scripts available to see back dates?.
2. How to see Julian date.
Thanks,
Thirumalai
Solved! Go to Solution.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2003 08:46 AM
03-11-2003 08:46 AM
Solution
1. set your TZ variable to plus 24. I'm in GMT0BST so the 0 becomes 24, not sure what happens if your zone is not zero.
2. there are a numbe rof links for this, see: http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0xea948cc5e03fd6118fff0090279cd0f9,00.html
2. there are a numbe rof links for this, see: http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0xea948cc5e03fd6118fff0090279cd0f9,00.html
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2003 08:51 AM
03-11-2003 08:51 AM
Re: Date and Julian Date on HP-UX 10.20
Hi,
take a look at next link, the famous script from A. Clay Stephenson
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x5a8d93e260b0d611abdb0090277a778c,00.html
Robert-Jan.
take a look at next link, the famous script from A. Clay Stephenson
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x5a8d93e260b0d611abdb0090277a778c,00.html
Robert-Jan.
- 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: Date and Julian Date on HP-UX 10.20
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...
# 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...
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2026 Hewlett Packard Enterprise Development LP