Operating System - HP-UX
1753880 Members
7408 Online
108809 Solutions
New Discussion

Check Daylight saving setting in hpux 11.31

 
AjeetArya
Occasional Visitor

Check Daylight saving setting in hpux 11.31

How can we check whether daylight saving in enable on HP UX 11.31 server or not. tztab patch is already applied on the serer.

 

-> swlist -l patch |grep       PHCO_39174
  PHCO_39174.UX-CORE       1.0               OS-Core.UX-CORE    applied
# PHCO_39174                                            1.0            tztab(4) cumulative patch
# PHCO_39174.UX-CORE                                       1.0               OS-Core.UX-CORE    applied

 

Thanks in advance.

A2
3 REPLIES 3
Patrick Wallek
Honored Contributor

Re: Check Daylight saving setting in hpux 11.31

Attached is a PERL script called 'dst.pl' (This script originally written by A. Clay Stephenson a few years ago).  Copy it to your HP-UX server, make it executable and run it.  It will tell you when the next time transition is.

 

Here is some example output from an 11.31 server:

 

11.31 root /root # ./dst.pl
Sun Mar 11 01:59:59 EST 2012 --> Sun Mar 11 03:00:00 EDT 2012
Sun Nov 04 01:59:59 EDT 2012 --> Sun Nov 04 01:00:00 EST 2012

 

11.31 root /root # uname -a

HP-UX abcdefg B.11.31 U 9000/800 111111111 unlimited-user license

The above shows that on Sunday Mar 11 the moved forward, Daylight Saving time.  On Sunday  Nov 4 the time will fall back 1 hour and revert to Standard time.

 

Dennis Handly
Acclaimed Contributor

Re: Check Daylight saving setting in HP-UX 11.31

>How can we check whether daylight saving is enabled?

 

It depends on your TZ variable setting and of course the time of the year.

Clay's dst.pl that Patrick mentioned will give you the beginning and ending times, if they exist.

Patrick Wallek
Honored Contributor

Re: Check Daylight saving setting in HP-UX 11.31

OK, I am trying to attach the script again.  It was apparently removed or not uploaded yesterday.

 

The script is attached as dst.sh.  When you copy it to your HP-UX server rename it to dst.pl.

 

If you like you can use this script to check the standard time / daylight saving time dates for time zones other than your default.

 

For example:

 

# TZ=EST-10EDT ./dst.pl     ## Australian Eastern timezone

Sun Apr 01 02:59:59 EDT 2012 --> Sun Apr 01 02:00:00 EST 2012

Sun Oct 07 01:59:59 EST 2012 --> Sun Oct 07 03:00:00 EDT 2012

 

# TZ=PST8PDT ./dst.pl         ## US Pacific timezone

Sun Mar 11 01:59:59 PST 2012 --> Sun Mar 11 03:00:00 PDT 2012

Sun Nov 04 01:59:59 PDT 2012 --> Sun Nov 04 01:00:00 PST 2012