- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Time Change - Automatically at Alternative tim...
Operating System - HP-UX
1758519
Members
2121
Online
108872
Solutions
Forums
Categories
Company
Local Language
юдл
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
юдл
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- 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
тАО02-27-2008 06:35 AM
тАО02-27-2008 06:35 AM
Time Change - Automatically at Alternative time
All,
I am wondering if it is possible to specify at what time I want DST to roll as opposed to when the system automatically changes. Example. The O/S will automatically adjust it's time ( for DST ) at 2:00am but our applications cannot handle this. I would like the system to automatically change at 5:00am. This is possible in AIX but I can't seem to find away in HPUX without scripting it myself.
Any help or direction would be greatly appreciated.
I am wondering if it is possible to specify at what time I want DST to roll as opposed to when the system automatically changes. Example. The O/S will automatically adjust it's time ( for DST ) at 2:00am but our applications cannot handle this. I would like the system to automatically change at 5:00am. This is possible in AIX but I can't seem to find away in HPUX without scripting it myself.
Any help or direction would be greatly appreciated.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-27-2008 06:44 AM
тАО02-27-2008 06:44 AM
Re: Time Change - Automatically at Alternative time
Just change the relevant line in /usr/lib/tztab. See man 4 tztab for details.
Pete
Pete
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-27-2008 06:45 AM
тАО02-27-2008 06:45 AM
Re: Time Change - Automatically at Alternative time
Hi:
I can't understand WHY you would want your server to adjust differently from your geopolitical rules, but that's immaterial.
I can't understand WHY your application "cannot handle this". I would think/hope that your application would log, etc. in epoch seconds (which don't change; only the perception of localtime. That's immaterial too, I guess.
THUS, simply change your '/usr/lib/tztab' using the 'tztab(4)' manpages as your guide. You will want to restart at least the 'cron' daemon and any long-running processes (like your application) or reboot before the appointed change of time in order to read and re-cache your modified rules.
Regards!
...JRF...
I can't understand WHY you would want your server to adjust differently from your geopolitical rules, but that's immaterial.
I can't understand WHY your application "cannot handle this". I would think/hope that your application would log, etc. in epoch seconds (which don't change; only the perception of localtime. That's immaterial too, I guess.
THUS, simply change your '/usr/lib/tztab' using the 'tztab(4)' manpages as your guide. You will want to restart at least the 'cron' daemon and any long-running processes (like your application) or reboot before the appointed change of time in order to read and re-cache your modified rules.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-28-2008 12:09 AM
тАО02-28-2008 12:09 AM
Re: Time Change - Automatically at Alternative time
>I am wondering if it is possible to specify at what time I want DST to roll as opposed to when the system automatically changes.
The system doesn't change the time, only libc changes the presentation.
>will automatically adjust its time (for DST) at 2:00am but our applications cannot handle this. I would like the system to automatically change at 5:00am.
As mentioned by Pete and JRF, you can change tztab.
Or you can also add additional timezones which do what you want and just export TZ for your application to those new ones.
In fact, if you are going to stop your application before 5 am, you can manually do the following:
export TZ=PST8
run application
This basically says that the timezone doesn't change at all. Then you remove that TZ setting when you restart the application.
Note: you can also export TZ to tell libc exactly when DST changes. See environ(5):
export TZ=PST8PDT,M3.2.0/5:00,M11.1.0/5:00
This works for at least 2008:
$ TZ=PST8PDT,M3.2.0/5:00,M11.1.0/5:00 dst.pl
Sun Mar 09 04:59:59 PST 2008 --> Sun Mar 09 06:00:00 PDT 2008
Sun Nov 02 04:59:59 PDT 2008 --> Sun Nov 02 04:00:00 PST 2008
$ dst.pl
Sun Mar 09 01:59:59 PST 2008 --> Sun Mar 09 03:00:00 PDT 2008
Sun Nov 02 01:59:59 PDT 2008 --> Sun Nov 02 01:00:00 PST 2008
>JRF: You will want to restart at least the cron daemon
No need to do this since cron isn't likely to be changing. (Or used by the application?)
>(like your application) before the appointed change of time in order to read
Yes, this would have to be done. And restart after if you don't want to do that next year.
The system doesn't change the time, only libc changes the presentation.
>will automatically adjust its time (for DST) at 2:00am but our applications cannot handle this. I would like the system to automatically change at 5:00am.
As mentioned by Pete and JRF, you can change tztab.
Or you can also add additional timezones which do what you want and just export TZ for your application to those new ones.
In fact, if you are going to stop your application before 5 am, you can manually do the following:
export TZ=PST8
run application
This basically says that the timezone doesn't change at all. Then you remove that TZ setting when you restart the application.
Note: you can also export TZ to tell libc exactly when DST changes. See environ(5):
export TZ=PST8PDT,M3.2.0/5:00,M11.1.0/5:00
This works for at least 2008:
$ TZ=PST8PDT,M3.2.0/5:00,M11.1.0/5:00 dst.pl
Sun Mar 09 04:59:59 PST 2008 --> Sun Mar 09 06:00:00 PDT 2008
Sun Nov 02 04:59:59 PDT 2008 --> Sun Nov 02 04:00:00 PST 2008
$ dst.pl
Sun Mar 09 01:59:59 PST 2008 --> Sun Mar 09 03:00:00 PDT 2008
Sun Nov 02 01:59:59 PDT 2008 --> Sun Nov 02 01:00:00 PST 2008
>JRF: You will want to restart at least the cron daemon
No need to do this since cron isn't likely to be changing. (Or used by the application?)
>(like your application) before the appointed change of time in order to read
Yes, this would have to be done. And restart after if you don't want to do that next year.
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP