- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Regarding Daylight Saving
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
- 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
09-20-2006 01:16 AM
09-20-2006 01:16 AM
Re: Regarding Daylight Saving
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-22-2006 01:22 AM
09-22-2006 01:22 AM
Re: Regarding Daylight Saving
1. I am able to see there is some changes in PST8PDT,EST5EDT,CST6CDT AND MST7MDT. Hope other timezones of US are not impacted by this daylight saving changes?
2. The below entries are not found in my tztab file
>Indiana daylight saving time EST5EDT#Indiana,CST6CDT#Indiana
>Pacific Standard Time, Pacific Daylight Time (for Malaysia or Singapore)
PST-8PDT
>Mexico City standard Time, Mexico City Daylight Savings Time
>
# These changes are done for following time zones in Australia.
# South Australia : CST-9:30CDT
# Tasmania : EST-10EDT#Tasmania
# New South Wales : EST-10EDT#NSW
# Victoria : EST-10EDT#VIC
# Australian Capital Territory : EST-10EDT"
3. If i want to modify only the US Timezone in my TZTAB File, if i copy PST8PDT,EST5EDT,CST6CDT AND MST7MDT contents from the patch tztab file and put it in my tztab file?
4. I have another system is hp-ux 11.0. If we install the patch in hp-ux 11.0 i am able to see the below command
swinstall -x autoreboot=true -x patch_match_target=true \
-s /tmp/PHCO_34673.depot
Will it restart the system automatically after installing the patch?
5. can i have a copy of tztab file in lib directory (/usr/lib/tztab.old) ? Don't know whether i can keep a back up there.
6. You had given me earlier these steps to get the patch file
1. Run ftp from a Command (MSDOS) window
2. type: ftp ftp.itrc.hp.com
3. username: ftp password: ftp
when i type password it's saying "it's not valid". Thought of using this way in future. I took the patch by alternative means.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-22-2006 01:45 AM
09-22-2006 01:45 AM
Re: Regarding Daylight Saving
With all due respect, don't make this more difficult on yourself than it needs to be.
With regard to your last questions:
1/2. The patch(es) are well tested, reflect current governmental rulings, and provide everything you need.
3. I would *not* attempt to extract only the U.S. timezone rules by adding the new criteria to your existing '/usr/lib/tztab'. Why would you go to this trouble? Either 'swinstall' the patch or extract it, as you have, and replace the existing '/usr/lib/tztab'.
4. While the standard 'swinstall' command uses '-x autoreboot=true', installation of these patches does *not* cause an automatic reboot. The 'swinstall' switch simply tells 'swinstall' to force a reboot *IF* one or more patches in an installation session require it. Patches labeled "PHCO" (for 'CO'mmand-related patches) do not.
5. You can keep a prior version of your 'tztab' as 'usr/lib/tztab.old' if you prefer. However, if you use 'swinstall', by default, you have the ability to roll-back a patch, which in this case would recover the previous software version.
Lastly, I'll add this:
Once the modification has been made to the '/usr/lib/tztab' any new process started will fall under the new "rules". A restart of 'cron' would cover cron tasks. New logins would execute 'login()' so the processes spawned by those would also abide by the new time changes. A reboot of the server sometime before the mandated time change would then align everything.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-22-2006 01:14 PM
09-22-2006 01:14 PM
Re: Regarding Daylight Saving
You need to understand that the change to daylight saving rules is a United States change, not just Central time. Yes, every timezone in the new version of tztab is now correct based on the new rules starting in 2007. That's not an impact, that is correct behavior.
2. There are several differences in the tztab file. You can see the 2007 changes with this command:
grep -e 2006 -e 2007 /usr/lib/tztab
These changes are correct for the respective timezones, assuming that no local political changes are made (very unlikely).
3. I would not do that because there are other changes that at some time in the future may become important to your system. If you can guarentee that no one from outside the U.S. will ever connect to your computer and need local time, then yes, you can cut-n-paste the new sections. By the way, I posted all those changes way up at the top of this post on Aug 16.
> 4. I have another system is hp-ux 11.0. If we install the patch in hp-ux 11.0 i am able to see the below command
swinstall -x autoreboot=true -x patch_match_target=true \
-s /tmp/PHCO_34673.depot
> Will it restart the system automatically after installing the patch?
It is important to always read the patch decription file, PHCO_34673.text where it says:
Automatic Reboot?: No
The command line you have above is correct except that the -x option should not be used UNLESS the patch description says it is necessary. Almost all PHKL patches and many PHNE patches require a reboot while PHCO doesn't require a reboot. The system will not restart even with the -x option because the patch does not require it.
However, from your previous comments, you are running 10.20 and there is *NO* patch for this system. So don't worry about swinstall. It will not install this patch.
> 5. can i have a copy of tztab file in lib directory (/usr/lib/tztab.old) ? Don't know whether i can keep a back up there.
Yes, it is OK to keep a copy there. But as I mentioned before, the original copy of tztab is found in /usr/newconfig/usr/lib.
6. when i type password it's saying "it's not valid"
I believe the massage reads like this:
230-The response 'ftp' is not valid
230-Next time please use your e-mail address as your password
230- for example: joe@itrc.hp.com
230 Guest login ok, access restrictions apply.
Remote system type is UNIX.
Using binary mode to transfer files.
This is nothing more than a note. Notice that it says "next time ..." If you don't like the message, use your email address as the password. Nothing is checked -- it's not really a password, just an entry logged in the ftp server. If you type the commands after the password like dir and cd, they work fine -- you are logged in just fine. This is called anonymous ftp.
And again, all of these changes are meaningless as long as your TZ value is CST0. Your local time will NOT change in the fall and will NOT change in the spring.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-23-2006 10:03 PM
09-23-2006 10:03 PM
Re: Regarding Daylight Saving
1. I am able to see the below entries in the new tztab file.
0 3 1-7 4 1987-2006 0 CDT5
0 3 8-14 3 2007-2038 0 CDT5
0 1 25-31 10 1975-2006 0 CST6
0 1 1-7 11 2007-2038 0 CST6
"Daylight Saving Time begins for most of the United States at 2:00 a.m. on the first Sunday of April. Time reverts to standard time at 2:00 a.m. on the last Sunday of October."
In the above entries why 2:00 am had not been put and instead of that 1:00 and 3:00 am is present. why the entries are 1:00 and 3:00?
2. When TZ=CST6CDT, when the daylight saving is not present OS will calulate the time as GMT-6 taking value 6 from TZ variable. When the daylight saving is present the OS will caluclate the time as GMT-5 by taking value 5 from CDT5 entry in TZTAB file. Pls correct me if my assumption is incorrect.
0 3 1-7 4 1987-2006 0 CDT5
0 3 8-14 3 2007-2038 0 CDT5
3. If i want to see the latest and archive patches that are released for HP-UX 11.0. How do i see that in HP-Site. In which web link i need to go. Also how to keep a track of timezone patches being released? Is there is a way in HP site?
4. I took swinstall statement from PHCO_34673.text file. I saw some details in that file i want to understand that could you help me out.
i)Hardware Platforms - OS Releases:
s700: 11.00
s800: 11.00
What is s700 and s800. Are they HP servers. Only for these servers which have HP-UNIX 11.0 will these patch work?
ii)Patch Description: s700_800 11.00 tztab(4) cumulative patch
what does a cummulative patch means
iii) I saw a description of Symptoms which has lot of patch numbers. What is this symptom. Does this patch PHCO_34673 includes all the patch number features listed under symptoms
iv)Saw this below line
"
Supersedes:
PHCO_13331 PHCO_18376 PHCO_21688 PHCO_24449 PHCO_27528 PHCO_34266"
what does this Supersedes denote?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-26-2006 03:34 PM
09-26-2006 03:34 PM
Re: Regarding Daylight Saving
tztab for Indiana is correct. Indiana has a long history of non-standard timezone settings. The 3am change is correct for the stated year ranges:
http://www.timeanddate.com/worldclock/timezone.html?n=105
I've attached a doc file from the Indiana legislature.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-26-2006 03:45 PM
09-26-2006 03:45 PM
Re: Regarding Daylight Saving
TZ=CST6CDT dst.pl -y 2006
TZ=CST6CDT dst.pl -y 2007
For the new Indiana timezone:
TZ="CST6CDT#Indiana" dst.pl -y 2006
TZ="EST5EDT#Indiana" dst.pl -y 2006
TZ="CST6CDT#Indiana" dst.pl -y 2007
TZ="EST5EDT#Indiana" dst.pl -y 2007
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-26-2006 07:58 PM
09-26-2006 07:58 PM
Re: Regarding Daylight Saving
Thanks a lot for the info
Pls hold on. I will be getting root id in one or two days. Will get back to you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-26-2006 11:50 PM
09-26-2006 11:50 PM
Re: Regarding Daylight Saving
Aside from the questions about timezones, you have asked about some of the fundamentals of patch management throughout this thread. When you have a few minutes, you should read the Patch Management User Guide for a better understanding of patch tools, terminology, and management strategies:
http://docs.hp.com/en/5991-4825/5991-4825.pdf
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-27-2006 06:12 PM
09-27-2006 06:12 PM
Re: Regarding Daylight Saving
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-04-2006 07:50 PM
10-04-2006 07:50 PM
Re: Regarding Daylight Saving
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-16-2006 07:13 AM
10-16-2006 07:13 AM
Re: Regarding Daylight Saving
I had tested modifying tztab file and it's working but i need to test the perl script.
Thx a lot for the info. Also i am trying to find application impacts because of daylight saving
1. I read about C's time function as below
time_t time(void)
time_t time(time_t *ptr)
include:
Returns the number of seconds that have passed since midnight, 1st
January 1970 GMT (or 7pm, 31st December 1969 EST).
So i understood the time_t function return value same as date -u unix cmd that is the GMT time. But when i do a ctime i am getting the value of date cmd (with daylight saving time added) My TZ is EST5EDT
void main()
{
long time1;
struct tm strtm;
time_t time2;
time(&time1);
time2=time(NULL);
printf("ctime is %s %s\n",ctime(&time2),ctime(&time1));
}
Does ctime functions adds the daylight saving time to time2 variable? Does time function returns GMT time that is shown date -u command?
2. In one of the HP-UX 10.2 system i am able to /etc/TIMEZONE file. In another HP-UX 11.0 system i am unable to see this TIMEZONE file. Is it user created?
cat /etc/TIMEZONE
TZ=EST5EDT
export TZ
3. Also when i set TZ=EST5 it's deducting 5 hrs from GMT. If i want to add 5hrs to GMT how do i do it? TZ=EST+5?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-16-2006 07:30 AM
10-16-2006 07:30 AM
Re: Regarding Daylight Saving
I am unable to find /etc/default/tz file in my system
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-16-2006 09:42 AM
10-16-2006 09:42 AM
Re: Regarding Daylight Saving
2. Someone has removed the /etc/TIMZONE file (NEVER do this). It is standard with every version since version 10.01 of HP-UX. It must be recreated -- just use this command:
echo "TZ=EST5EDT\nexport TZ" > /etc/TIMEZONE
3. EST5 is not deducting 5 hours, it is a measurement of the offset going East to West, so it is a positive number. Thus, EST+5 and EST5 are the same. The offset going East to West will be negative and XYZ-5 will produce the time in Bangkok.
4. The man page for ctime states:
"The file /etc/default/tz contains the timezone value used by tzset() when the environment variable TZ is not set."
The /etc/default directory is relatively new and the contents are managed by various tools or patches. So an older system may not have a tz file. Or as with /etc/TIMEZONE, someone logged on as root may have removed it (not recommended).
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-16-2006 10:00 AM
10-16-2006 10:00 AM
Re: Regarding Daylight Saving
In answer to your latest questions:
1. If you look at the manpages for 'ctime(3C)' you will find the answers to your first questions. 'ctime()' returns a localtime.
http://www.docs.hp.com/en/B2355-60127/ctime.3C.html
2. The file '/etc/TIMEZONE' should be present. Its presence is tested for in '/etc/profile' to set the default 'TZ'. In or around 11.0, the file '/etc/default/tz' was added to provide a default value for TZ should '/etc/TIMEZONE' be absent.
3. You can create any timezone (TZ) value you want. Do this for the duration of the command line by doing:
# TZ=GMT+5 date
# TZ=GMT-5 date
Note that there is simply whitespace between the TZ=
To better understand the TZ behavior read the manpages for 'tztab(4)':
http://www.docs.hp.com/en/B2355-60127/tztab.4.html
If you use the script posted by Bill from Clay, you have a ready-made test suite. Perl uses the standard, underlying C routines to ascertain time.
Please consider providing points to this thread for all the help and digressions we have taken. Thanks.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2006 12:05 AM
10-17-2006 12:05 AM
Re: Regarding Daylight Saving
1. I checked about tzset function in the URL that you had given. I am able to see the below.
" a) if the environment variable TZ is present, it takes precedence.
b) if TZ is not present, then the value contained in /etc/default/tz is used for the default.
c) if /etc/default/tz is not set then the default value is equivalent to EST5EDT (Eastern Standard Time) of the USA."
My understanding is first it will set environment variable TZ from /etc/TIMEZONE and after that it will perfom the below steps a,b,c. Pls correct me if i am wrong.
2. Also my assumption is /etc/TIMEZONE is present in HP-UX 10.2,HP-UX 11.0.... and /etc/default/tz was introduced from HP-UX 11.0 Only (older version doesn't have). Pls correct me if my assumption is wrong.
3. set_parms timezone. What does it do? Does it updates TZ environmental variable or /etc/default/tz file or /etc/TIMEZONE file or /usr/lib/tztab?
4. I am able to see in man pages about time function as below "time() returns the value of time in seconds since the Epoch."
My assumption is time() return value is same as gmt time displayed via date -u command.
In the below program i am displaying the time function's output value. It's displayed as long value. In your earlier comment you had said "The man pages for time() and ctime() are helpful. man 2 time (have to use 2 to get the library call) says that it is the time since the Unix Epoch. By definition, this is UTC time" . So time function output should match the output of date -u command i.e GMT Time? How do i check it? It's showing as long value.
"main.c" 34 lines, 925 characters
1 #include
2 #include
3
4 void main()
5 {
6 long time1;
7 struct tm strtm;
8 time_t time2;
9 time(&time1);
10 time2=time(NULL);
11 printf(" \n time %ld",time1);
12 printf(" \n time %ld",time2);
13 }
14
/home/pr/testdaylight ==> CC main.c
CC: "main.c", line 7: warning: strtm not used (117)
CC: "main.c", line 13: warning: Function 'main' must return type 'int' (anachronism) (312)
/home/pr/testdaylight ==> ./a.out
time 1161084886
time 1161084886/home/pr/testdaylight ==> date -u
Tue Oct 17 11:34:51 UTC 2006
/home/pr/testdaylight ==> date
Tue Oct 17 07:34:53 EDT 2006
/home/pr/testdaylight ==> echo $TZ
EST5EDT
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2006 01:21 AM
10-17-2006 01:21 AM
Re: Regarding Daylight Saving
2. That sounds about right. There isn't really a single document that defines the various files that can be in /etc/default.
3. Yes, /etc/TIMEZONE is created by set_parms The /sbin/set_parms script is used to configure many different settings in HP-UX. They are:
hostname
timezone
date_time
root_passwd
ip_address
addl_netwrk
and this script is primarily used during the first bootup of a new system. It can be used to change the above items. This script constantly changes internally and at 11.11, the first few lines in /sbin/set_parms.d/10_timezone show this:
echo "TZ=$TZ\nexport TZ" > $TIMEZONE_FILE
echo "$TZ" > $DEFAULT_TZ_FILE
Now another 11.11 system does not show the second line ($DEFAULT_TZ_FILE which is set to /etc/default/tz) so it is a relatively new feature. Now all of this is way too much information. The tz file can exist or not and will have no effect on a properly configured HP-UX system (ie, /etc/TIMEZONE is present and correct).
4. "My assumption is time() return value is same as gmt time displayed via date -u command." Not quite. date -u shows a formatted date while time() returns the number of seconds since the Epoch. So they can't be compared. To find the number of seconds since the Epoch, use this:
perl -le 'print time'
In this case, time is the time() library call and if you do this:
TZ=EST5EDT perl -le 'print time'
perl -le 'print time'
you'll see no difference -- the time() function does not care about timezones because it is a simple count of seconds since Jan 1 1970, the Unix Epoch.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2006 03:37 AM
10-17-2006 03:37 AM
Re: Regarding Daylight Saving
# echo $TZ
EST5EDT
# date -u
Tue Oct 17 14:56:05 UTC 2006
# perl -le 'print time'
1161096974
# TZ=EST5EDT perl -le 'print time'
1161096997
# date
Tue Oct 17 10:56:38 EDT 2006
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2006 04:54 AM
10-17-2006 04:54 AM
Re: Regarding Daylight Saving
Pasted the errors below
# ./dst.pl -y 2007
"use" may clash with future reserved word at ./dst.pl line 5.
syntax error in file ./dst.pl at line 5, next 2 tokens "use English"
"use" may clash with future reserved word at ./dst.pl line 6.
"use" may clash with future reserved word at ./dst.pl line 7.
"use" may clash with future reserved word at ./dst.pl line 8.
"use" may clash with future reserved word at ./dst.pl line 9.
"use" may clash with future reserved word at ./dst.pl line 11.
"use" may clash with future reserved word at ./dst.pl line 21.
"use" may clash with future reserved word at ./dst.pl line 22.
"use" may clash with future reserved word at ./dst.pl line 23.
"use" may clash with future reserved word at ./dst.pl line 25.
"use" may clash with future reserved word at ./dst.pl line 26.
"use" may clash with future reserved word at ./dst.pl line 27.
"my" may clash with future reserved word at ./dst.pl line 33.
syntax error in file ./dst.pl at line 33, next 2 tokens "my $msg "
"my" may clash with future reserved word at ./dst.pl line 34.
"use" may clash with future reserved word at ./dst.pl line 94.
syntax error in file ./dst.pl at line 94, next 2 tokens "use integer"
"my" may clash with future reserved word at ./dst.pl line 96.
"my" may clash with future reserved word at ./dst.pl line 97.
"my" may clash with future reserved word at ./dst.pl line 98.
"my" may clash with future reserved word at ./dst.pl line 99.
"my" may clash with future reserved word at ./dst.pl line 100.
"my" may clash with future reserved word at ./dst.pl line 101.
"my" may clash with future reserved word at ./dst.pl line 104.
"my" may clash with future reserved word at ./dst.pl line 105.
"my" may clash with future reserved word at ./dst.pl line 106.
"my" may clash with future reserved word at ./dst.pl line 127.
syntax error in file ./dst.pl at line 127, next 2 tokens "my $go_down "
"my" may clash with future reserved word at ./dst.pl line 128.
"my" may clash with future reserved word at ./dst.pl line 129.
"my" may clash with future reserved word at ./dst.pl line 177.
syntax error in file ./dst.pl at line 177, next 2 tokens "my $year "
"my" may clash with future reserved word at ./dst.pl line 178.
"my" may clash with future reserved word at ./dst.pl line 179.
"my" may clash with future reserved word at ./dst.pl line 180.
"my" may clash with future reserved word at ./dst.pl line 181.
"my" may clash with future reserved word at ./dst.pl line 182.
"our" may clash with future reserved word at ./dst.pl line 184.
"getopts" may clash with future reserved word at ./dst.pl line 186.
syntax error in file ./dst.pl at line 186, next 2 tokens "getopts("
"usage" may clash with future reserved word at ./dst.pl line 189.
syntax error in file ./dst.pl at line 191, next 2 tokens "}"
syntax error in file ./dst.pl at line 196, next 2 tokens "}"
syntax error in file ./dst.pl at line 201, next 2 tokens "}"
syntax error in file ./dst.pl at line 206, next 2 tokens "}"
./dst.pl has too many errors.
#
Also i was thinking whether it could be version of perl is creating the problem. so i did the below one
#perl -v
This is perl, version 4.0
$RCSfile: perl.c,v $$Revision: 4.0.1.8 $$Date: 1993/02/05 19:39:30 $
Patch level: 36
Copyright (c) 1989, 1990, 1991, Larry Wall
Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 4.0 source kit.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2006 05:03 AM
10-17-2006 05:03 AM
Re: Regarding Daylight Saving
Yes, your version of Perl is absolutely ancient. I suggest that you download (for free) and install the most recent Perl (5.8.8) from here:
http://h20293.www2.hp.com/portal/swdepot/displayProductInfo.do?productNumber=PERL
(or):
http://mirrors.develooper.com/hpux/
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2006 12:11 PM
10-17-2006 12:11 PM
Re: Regarding Daylight Saving
swlist -l product | grep -i perl
If it is there, the path to Perl is *NOT* /usr/contrib or /usr/local, it is located in /opt. The latest version of Perl for 11.xx systems can be downloaded from HP from:
http://h20293.www2.hp.com/portal/swdepot/displayProductInfo.do?productNumber=PERL
To simplify all the possible Perl scripts, so you don't have to keep editing each one to put in the /opt/perl... line, just use a symlink in /usr/bin to location of Perl.
To answer your question about time and date -u, the OS does not keep time formatted nicely for humans -- it keeps Epoch time, that is, seconds since Jan 1970. So date -u calls library code to convert from Epoch time to the human readable format. Since the Epoch time started in UTC, the Epoch seconds are also in UTC. There is only one time in HP-UX and that is Epoch time in seconds. Every date/time representation is derived from those seconds.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2006 11:27 PM
10-17-2006 11:27 PM
Re: Regarding Daylight Saving
> cat main.c
#include
#include
void main()
{
long time1;
struct tm strtm;
time_t time2;
time(&time1);
time2=time(NULL);
printf(" \n time %ld",time1);
printf(" \n time %ld",time2);
}
>./a.out
time 1161169174
time 1161169174
> date -u
Wed Oct 18 11:02:38 UTC 2006
>date
Wed Oct 18 07:02:40 EDT 2006
The output of this program shows 1161169174 seconds that is the number of seconds that have passed since midnight, 1st January 1970 GMT. If i add these seconds from from jan 1'st 1970 will i get the
value as "Wed Oct 18 11:02:38 UTC 2006" (date -u output). Is my understanding is correct?
2. I tried the below one you had said but i am not getting the output. I will try to install the perl
/ ==> /usr/sbin/swlist -l product | grep -i perl
/ ==> whence perl
/usr/contrib/bin/perl
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2006 11:29 PM
10-17-2006 11:29 PM
Re: Regarding Daylight Saving
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2006 11:47 PM
10-17-2006 11:47 PM
Re: Regarding Daylight Saving
You won't find an official patch for 10.20 since that release is out-of-support. In fact, note that 11.0 falls into that category in December 2006:
http://www.hp.com/softwarereleases/releases-media2/history/slide2.html
That said, you can simply *copy* '/usr/lib/tztab' from an 11.0, 11.11 or 11.23 system to your 10.20 box. Normally, you use 'swinstall' to install a patch that encapsulates the 'tztab' file. Providing the updated file in this manner records, in the Installed Product Database ('/var'/adm/sw'), the installation. Thus, a subsequent 'swlist' will show the history. In the case of 10.20 you will merely sacrifice this record by copying a new 'tztab' in place.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-18-2006 01:59 AM
10-18-2006 01:59 AM
Re: Regarding Daylight Saving
http://www.hp.com/softwarereleases/releases-media2/history/slide2.html
In the above HP-LINK that you had provided it showing only the release history of HP-UX system. It doesn't speak anything about daylight saving or tztab.