- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Days until time change?
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-11-2005 02:23 AM
10-11-2005 02:23 AM
I have been asked to send notices indicating the numbers of days remaining until the change to standard time. Is there a command that will display when the time changes? Date doesn't seem to have an option for this.
Thanks,
Bob
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-11-2005 02:29 AM
10-11-2005 02:29 AM
Re: Days until time change?
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-11-2005 02:29 AM
10-11-2005 02:29 AM
Re: Days until time change?
The rules for timezone changes can be found in '/usr/lib/tztab'.
To help you understand it, see the manpages for 'tztab' too.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-11-2005 02:30 AM
10-11-2005 02:30 AM
Re: Days until time change?
I generally just use google to figure out what day the time change is :-)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-11-2005 02:33 AM
10-11-2005 02:33 AM
Re: Days until time change?
We've already changed our time in Israel, which is messing up all my communications plans for the US. I literally don't know what time it is and my PC has to be set to the Iraq time zone to keep proper time here.
Strange.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-11-2005 02:33 AM
10-11-2005 02:33 AM
Re: Days until time change?
TZ=EST5EDT
and try checking the differences.
-Arun
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-11-2005 02:36 AM
10-11-2005 02:36 AM
Re: Days until time change?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-11-2005 02:37 AM
10-11-2005 02:37 AM
SolutionDAYS=$(dst.pl -d)
echo "${DAYS} until the next time change.")
Add the -e option to display the truncated integer value. Invoke as dst.pl -u for full usage. If you install Perl on your Windoes box, it will even work there.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-11-2005 02:45 AM
10-11-2005 02:45 AM
Re: Days until time change?
DAYS=$(dst.pl -d)
echo "${DAYS} until the next time change.")
should be:
DAYS=$(dst.pl -d)
echo "${DAYS} until the next time change."
I don't know who added that superfluous (and unnecessary) ')'.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-26-2005 06:01 AM
10-26-2005 06:01 AM
Re: Days until time change?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-26-2005 06:33 AM
10-26-2005 06:33 AM
Re: Days until time change?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-26-2005 06:50 AM
10-26-2005 06:50 AM
Re: Days until time change?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-26-2005 08:49 AM
10-26-2005 08:49 AM
Re: Days until time change?
export TZ=BILLH5:21
Now when I type the date command, it offsets GMT -5 hours and 21 minutes with no daylight saving rule. I know, it's a dumb timezone but it illustrates how easy it is to change the way time is displayed. NOTE: setting the date/time always uses the current value of $TZ so make sure it is correct if you decide to experiment. And in general, setting the date and time on a production system is not a good idea. That's why NTP exists.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-26-2005 09:01 AM
10-26-2005 09:01 AM
Re: Days until time change?
dst.pl -n # use default TZ
TZ=EST5EDT dst.pl -n # use Eastern (U.S.)
TZ=PST8PDT dst.pl -n # use Pacific (U.S.)
In this mode, dst.pl will display the time 1 second before and the exact second of the time change (if the time actually changes). If using a TZ that does not change (e.g. GMT0) then the output is null (and a non-zero status is returned).