- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- set European Time on US HP-UX Box
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
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
тАО10-30-2006 11:45 PM
тАО10-30-2006 11:45 PM
I have an environment file. All the shell scripts of my application gets executed after reading environment file. The application is installed on US HP-UX box i.e. CST timings. Is there any way or command by which I could run all the shells in CET timings instead of system time (CST)?
Thank you!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-30-2006 11:57 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-30-2006 11:57 PM
тАО10-30-2006 11:57 PM
Re: set European Time on US HP-UX Box
export TZ=CET
Yang
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-31-2006 12:00 AM
тАО10-31-2006 12:00 AM
Re: set European Time on US HP-UX Box
If you want your server to use the CET timezone for every process, run:
# /sbin/set_parms timezone
...and follow the menu to choose the timezone you want.
If you have an environment file that all of your scripts source (read), then all you need to is:
# export TZ=CET
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-31-2006 12:05 AM
тАО10-31-2006 12:05 AM
Re: set European Time on US HP-UX Box
If you are running the scripts through cron:
1) In /etc/TIMEZONE, change "TZ=CST" to "TZ=CET".
2) Restart cron:
/sbin/init.d/cron stop
/sbin/init.d/cron start
Note that changing $TZ does not actually adjust the system clock, it merely changes the local representation of UTC time.
PCS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-31-2006 12:26 AM
тАО10-31-2006 12:26 AM
Re: set European Time on US HP-UX Box
I feel export TZ=CET is a good solution. But would it work fine in day/light saving also, I tried to test it . But does not seem to work fine. See below:
$ date
Tue Oct 31 14:23:55 MET 2006
$ date -u
Tue Oct 31 13:23:59 UTC 2006
$ export TZ=CST
$ date
Tue Oct 31 13:24:10 CST 2006
$ export TZ=UTC
$ date
Tue Oct 31 13:24:31 UTC 2006
$ export TZ=CET
$ date
Tue Oct 31 13:24:39 CET 2006
$ unset TZ
$ echo $TZ
$ date
Tue Oct 31 08:25:06 EST 2006
$ export TZ=CET+1
$ date
Tue Oct 31 12:25:40 CET 2006
$
Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-31-2006 12:35 AM
тАО10-31-2006 12:35 AM
Re: set European Time on US HP-UX Box
This works:
# TZ=CET date
Tue Oct 31 13:34:16 CET 2006
# TZ=CET1CDT date
Tue Oct 31 12:34:21 CET 2006
# TZ=CET1 date
Tue Oct 31 12:34:26 CET 2006
# TZ=CET-1 date
Tue Oct 31 14:34:32 CET 2006
You can set the TZ variable only for the duration of the command by setting the variable to a value, following that with a whitespace and the command on the same line.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-31-2006 12:37 AM
тАО10-31-2006 12:37 AM
Re: set European Time on US HP-UX Box
$ more /usr/lib/tztab
$ export TZ=CST6CDT
$ date
$ export TZ=MET-1METDST
$ date
PCS