- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Change to GMT time zone
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
Discussions
Discussions
Discussions
Forums
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
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
тАО12-21-2003 01:05 AM
тАО12-21-2003 01:05 AM
Change to GMT time zone
Hi
1- I'm in WAT-3 zone and I want to change it to GMT format "GMT+3". When I change it and fix the time to our local time. I check the date it gives me the right local time, but when I check the date -u it gives me the UTC time but with +6 hours than what it should be??
2- How can I make sure that the time that I put it will not change automatically to the day/light timing? "I want it to be a fix time year around without change.
Thanks,
Mike
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-21-2003 02:12 AM
тАО12-21-2003 02:12 AM
Re: Change to GMT time zone
That might be set wrong, still
date -u is supposed to give GMT btw, but I think you know that.
I don't think the OS is going to do the time change automatically unless you are using ntp, but things may have changed in the 6 or so years I've had us on NTP.
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
тАО12-21-2003 07:18 AM
тАО12-21-2003 07:18 AM
Re: Change to GMT time zone
Since you need to change the current time, it is *always* best to shutdown all applications (or perhaps go to single user mode), then run the command:
/sbin/set_parms date_time
Set the timezone you'd like to use and then set the time of day and date. You will also need to change the kernel parameter timezone and dst. Run SAM and read the Help on Context for these 2 paramters.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-21-2003 07:22 AM
тАО12-21-2003 07:22 AM
Re: Change to GMT time zone
Let me put this way, Weare in the cuntry of Qatar "GMT + 3". When I first set the server or do /sbin/set_parms timezone it doesn't show me Qatar as a zone under Asia. so I take the closest with the same timing Saudi Arabia. It shows me that the my time zone is WAT-3 !!!!
Some of our application don't recognize WAT, so we would like to change it to GMT format which is GMT+3. after I set the GMT+3 as my TZ and set the correct time. # date shows me the right time "example 16:00". When I do # date -u we expect 13:00 since we are 3hours ahead of GMT, but it shows us 19:00 !!!!!!
What shall I do inorder to get my local time with GMT+3 TZ when I do #date and to get GMT "UTC" when I do #date -u ?????
could some one confirm that the system time will night change AUTOMATICALLY to daylight since I'm using NTP?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-21-2003 01:20 PM
тАО12-21-2003 01:20 PM
Re: Change to GMT time zone
TZ=GMT+3 date
TZ=GMT date
TZ=GMT-3 date
As you will see, the date command (and all related time/date system calls) will translate the time from GMT. Once GMT+3 has been set, NOW you can now change time using the date command and HP-UX will set interpret what you type, subtract 3 hours and set the internal time to GMT. HP-UX time was set based on the value of TZ when the date command (to change time/date) was last issued.
The tztab file can be edited and any timezone can be added. Since timzones are political and not astrometric, this file is quite versatile. If you need daylight savings, you can use the comments in the tztab file as well as the tztab man page to create the required rules.
Note that daylight saving is defined (or not defined) by the TZ value. If you use GMT+3 then there is no daylight saving change. If you need daylight saving for some users, you'll need the details for your country on start dates and normal dates.
Now it's important to understand that TZ does *NOT* change time, only the representation. If you chage TZ while you are logged in, only the time for your shell and and child processes you run will be affected. SO for applications that are started automatically, the environment must be explicitly to make sure HP-UX knows how to translate time for the applcation.
As far as NTP goes, NTP *always* uses GMT, just like HP-UX. So there will never br a 'jump' in time. HP-UX will always count 86400 seconds every day. How time is displayed to a user or application is the function of TZ.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-22-2003 01:02 AM
тАО12-22-2003 01:02 AM
Re: Change to GMT time zone
TZ=WAT-3
did date and it showed showed GMT plus 3 hours for local time.
TZ name and -offset
So TZ=WAT3 says local time is 3 hours behind GMT. TZ=WAT-3 says local time is -(-3) or three hours ahead of GMT.
Time is kept in UTC, the offset is applied before it's displayed.
So.....
$ TZ=WAT-3
$ date
Mon Dec 22 16:53:24 WAT 2003
$ TZ=WAT3
$ date
Mon Dec 22 10:53:33 WAT 2003
$ date -u
Mon Dec 22 13:53:39 UTC 2003
$
If you put WAT3WDT, I think you enable DST. Not really sure.
Hope this helps. It's kinda lame, but I'm on vacation.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-22-2003 01:37 AM
тАО12-22-2003 01:37 AM
Re: Change to GMT time zone
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-22-2003 01:53 AM
тАО12-22-2003 01:53 AM
Re: Change to GMT time zone
TZ=WAT3WDT date
which works the same as:
TZ=YYY3YDT date
Since there is no entry for WAT or WDT, there won't be any action taken for daylight saving.
Bill Hassell, sysadmin