Sponsored Content
Full Discussion: DST change on Compaq Tru64
Operating Systems HP-UX DST change on Compaq Tru64 Post 302565316 by vbe on Monday 17th of October 2011 01:56:12 PM
Old 10-17-2011
There is always this you can attempt:
https://h20565.www2.hp.com/portal/si...tte.cachetoken
Quote:
CAUTION: This sample program has been tested using DEC C v 6.5 on OpenVMS IA64 v 8.2. However, there is no guarantee for its effectiveness because of the possibility of error in transmitting or implementing the program. It is meant to be used as a template for writing your own program, and may require modification for use on your system.

This program is supported on the following systems:

Product: DEC C, all versions

Operating System: OpenVMS, v 7.3-2 and Above, HP Tru64 UNIX, v 5.1B PK4, HP-UX B.11.23

Details

PROGRAM NOTES:

An alternative to setting (setenv ) the environment variable TZ is to define the symbol TZ prior to running the program.
See description of procedure tzset() in the DEC C Run-Time Library Reference Manual for OpenVMS Systems.
NOTE: Defining TZ also impacts localtime , mktime , strftime and wcsftime functions. See the description of procedure tzset() in the HP C Run-Time Library Reference Manual for OpenVMS Systems .

Click here to view the HP C Run-Time Library Reference Manual for OpenVMS Systems.

Compilation, link and run:

$ cc/prefix=all time
$ link time
$ run time

PROGRAM:

/*
COPYRIGHT ©) 1998-2005 BY
HEWLETT-PACKARD COMPANY
ALL RIGHTS RESERVED.

THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE USED AND COPIED
ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION
OF THE ABOVE COPYRIGHT NOTICE. THIS SOFTWARE OR ANY OTHER COPIES
THEREOF MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER
PERSON. NO TITLE TO AND OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.

THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE WITHOUT NOTICE AND
SHOULD NOT BE CONSTRUED AS A COMMITMENT BY HEWLETT-PACKARD COMPANY.

HP ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS
SOFTWARE ON EQUIPMENT THAT IS NOT SUPPLIED BY HP.

NO RESPONSIBILITY IS ASSUMED FOR THE USE OR RELIABILITY OF SOFTWARE
ON EQUIPMENT THAT IS NOT SUPPLIED BY HEWLETT-PACKARD COMPANY.

SUPPORT FOR THIS SOFTWARE IS NOT COVERED UNDER ANY HP SOFTWARE
PRODUCT SUPPORT CONTRACT, BUT MAY BE PROVIDED UNDER THE TERMS OF THE
CONSULTING AGREEMENT UNDER WHICH THIS SOFTWARE WAS DEVELOPED.
*/

/*
With HPUX 11i V2 (B.11.23)

$ ./time
tzname[0] = MET, tzname[1] = METDST, daylight = 1, timezone = -3600
Local time is Tue Feb 1 08:39:04 2005

tzname[0] = MET, tzname[1] = MET_DST, daylight = 1, timezone = -3600
In France the time is Tue Feb 1 08:39:04 2005

tzname[0] = STD, tzname[1] = , daylight = 0, timezone = 0
GMT Time is Tue Feb 1 07:39:04 2005

With Tru64 V5.1B and OpenVMS V7.3-2
$ run time
tzname[0] = MET, tzname[1] = MET DST, daylight = 1, timezone = -3600
Local time is Tue Feb 1 08:49:46 2005

tzname[0] = MET, tzname[1] = MET_DST, daylight = 1, timezone = -3600
In France the time is Tue Feb 1 08:49:46 2005

tzname[0] = GMT, tzname[1] = , daylight = 0, timezone = 0
GMT Time is Tue Feb 1 07:49:46 2005

*/

#include <stdio.h>
#include <stdlib.h>
#include <time.h>

main(){
time_t local_time;
char *pdat;

/*
* Get Universal Time Coordinates time.
*/
local_time = time(NULL);

/*
* Get the Local Time Zone environment variable.
*/
tzset();
printf ("tzname[0] = %s, tzname[1] = %s, daylight = %d, timezone = %d\n",
tzname[0],tzname[1],daylight,timezone);
pdat = ctime(&local_time);
printf ("Local time is %s\n",pdat);
/*
* Set the Standard Time Zone to -1 hour from GMT.
* The Daylight Savings Time Zone saving to -2 hours from GMT.
* date when change from standard time to summer time occurs on:
* 3nd of March at 2AM
* date when change from summer time to standard time occurs on:
* 5th of September at 3AM.
*/
#if defined (__unix)
putenv("TZ=MET-1MET_DST-2,M3.4.0/2,M10.5.0/3");
#elif defined (__VMS)
setenv ("TZ","MET-1MET_DST-2,M3.4.0/2,M10.5.0/3",0);
#endif
/*
* Get the French Time Zone environment variable.
*/
tzset();
printf ("tzname[0] = %s, tzname[1] = %s, daylight = %d, timezone = %d\n",
tzname[0],tzname[1],daylight,timezone);
pdat = ctime(&local_time);
printf ("In France the time is %s\n",pdat);
#if defined (__VMS)
unsetenv("TZ");
#endif
/*
* Reset TZ environment variable to GMT time.
*/
#if defined (__unix)
putenv ("TZ=GMT0");
#elif defined (__VMS)
setenv ("TZ","GMT0",0);
#endif
/*
* Get the GMT Zone environment variable.
*/
tzset();
printf ("tzname[0] = %s, tzname[1] = %s, daylight = %d, timezone = %d\n",
tzname[0],tzname[1],daylight,timezone);
pdat = ctime(&local_time);
printf ("GMT Time is %s\n",pdat);
#if defined (__VMS)
unsetenv("TZ");
#endif
}
 

10 More Discussions You Might Find Interesting

1. Programming

HPUX and Compaq problem-urgent

Hi All Following is the lines of code which simply makes a structure of 1 bit member and 7 bit is unused.Then the structure is initialised with char pointer.The output on HPUX(BIG Endian) and Compaq(Little Endian) are different.On HPUX it gives zero and Compaq it gives 1. I never thought that the... (7 Replies)
Discussion started by: Shobhit
7 Replies

2. Filesystems, Disks and Memory

Compaq Scsi

Howto make Debian GNU/Linux install boot on a Compaq DeskPro XL 590 with Compaq SCSI diskdrive? The problem is that Compaq's Scsi controller sems to be odd. help please :) (0 Replies)
Discussion started by: Esaia
0 Replies

3. UNIX for Dummies Questions & Answers

tru64 ip change

I'm trying to change the IP address of a Tru64 v4.0e box. The ifconfig command is not working. I am using the following format (which does not return an error): ifconfig tu1 xxx.xxx.xxx.xxx netmask 255.255.255.0 The xxx* indicates the new IP. After entering that command, an ifconfig -a command... (1 Reply)
Discussion started by: bscottiii
1 Replies

4. SCO

compaq smart array 532

Trying to install Sco openserver on HP Proliant with this scsi controller but no scsi devices detected. Boot controller is set as the smart array 532 but SCSI diags do not detect any SCSI boot devices during boot sequence Any help appreciated (2 Replies)
Discussion started by: farmacy
2 Replies

5. UNIX for Dummies Questions & Answers

Help In Compaq Tru64 UNix

Hi, I am new to UNIX. I need help in working with Compaq-UX TRU64 OS. How It work FTP Server? ANd MAil Server? and I have apach pprogram project and it work as HTTP Server. Also I need how can setup a new version of progrm on UNix like mozilla and adobe reader etc........... Thank... (3 Replies)
Discussion started by: svuad
3 Replies

6. Shell Programming and Scripting

DST Change For Australia

Hello , We are investigating an issue from a customer from Western Australia related to DST change on 25 th March. The customer in Australia has the below settings for Time Zone. The System is Solaris 9. TZ=Australia/NSW CMASK=022 We are trying to reproduce the problem in our local... (1 Reply)
Discussion started by: Mohammed
1 Replies

7. Linux

OS for Compaq Presario 1685

Hi, Trying to install a small OS to run this old laptop. Compaq Presario 1685, circa '98 Processor: AMD K6-2 380 MHz Data Bus Speed: 66 MHz Ram Installed 32 MB moduled Hard Drive: 4.3 GB DVD-ROM Burned in a CD “PUPPY-4.3beta1-k2.6.25.16-v423-SCSI”, tried to boot with it several times BUT... (7 Replies)
Discussion started by: nichos
7 Replies

8. Linux

DST Time Change for positive timezones not working

I was doing timezone and DST testing which is required for some of my products Here is the strange behaviour i observed First i did set the timezone to PST 2010 (which is less than GMT basically negative timezone) zdump -v /etc/localtime |grep 2010 /etc/localtime Sun Mar 14 09:59:59... (0 Replies)
Discussion started by: ravindra1103
0 Replies

9. AIX

Bug in AIX 6.1/7.1 Time Zone DST Change -again

Hi Everyone Just wanted to share with you that IBM AIX is having again problem with Summer Time Shift.. IBM Possible Action Required: System time may not change properly at DST start/end dates on AIX 7.1 and AIX 6.1 - United States For me it means some additional overtimes in the... (0 Replies)
Discussion started by: gito
0 Replies

10. AIX

Change Time Zone to UTC without DST

Hello AIX friends, We have timezone settings on our AIX 6.1 boxes set to Europe/London. How can I change it to UTC timezone with Daylight saving disabled. After running "smit chtz_user" I don't see UTC option in the listing. Please advise. TIA (3 Replies)
Discussion started by: prvnrk
3 Replies
All times are GMT -4. The time now is 10:38 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy