Sponsored Content
Operating Systems HP-UX Getting numeric timezone on HP-UX Post 302674371 by jim mcnamara on Thursday 19th of July 2012 01:05:32 PM
Old 07-19-2012
Is the TZ variable defined? That overrides the default file settings for timezones.

Check
Code:
/etc/timezone

it should be the setting for the current system timezone.

In HPUX the
Code:
/usr/lib/tztab

file has all of the settings for timezones. Check man tztab to learn how to set those to have offsets. I have not done HP-UX for loong time.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Timezone

Hello again, under hp-ux i have a file /etc/TIMEZONE. here is definied which timezone i am. i dont know who reads this file to set after reading the timezone under /usr/lib/tztab. my 2 questions, who reads the file /etc/TIMEZONE ( which service ) and do i need in the first line to set my... (6 Replies)
Discussion started by: ortsvorsteher
6 Replies

2. UNIX for Dummies Questions & Answers

Timezone

Hi, I got an question about changing timezone thrue command line on a SunOS Release 4.1.2 without restarting the computer. Now it's set on WET and I want to set the timezone to CET (GMT +1) Plz somebody help me. Regards Novisern:confused: (5 Replies)
Discussion started by: Novisern
5 Replies

3. UNIX for Dummies Questions & Answers

timezone

Hi, i am searching to change the timezone on a HP-UX11 system. Since last weekend the summertime started i am not able to change the time to the new time, every day the time changes back to wintertime. I think the problem is that the server is on the wrong timezone. Can someone help me please?... (1 Reply)
Discussion started by: eddyvdv
1 Replies

4. UNIX for Advanced & Expert Users

Timezone

HI ; I got Solaris8 installed oon Sunfire V440 .I have TZ=GMT in /etc/TIMEZONE , but when i log in as root i see the date in GMT+1. So i have every time to "set TZ=GMT ; export $TZ" . How can i set the TZ=GMT at the startup defenitely. Thanks :) (7 Replies)
Discussion started by: oss
7 Replies

5. Shell Programming and Scripting

Perl code to differentiate numeric and non-numeric input

Hi All, Is there any code in Perl which can differentiate between numeric and non-numeric input? (11 Replies)
Discussion started by: Raynon
11 Replies

6. Solaris

Timezone query

Hi Everyone, We have Solaris server which displays the time in CET and our application is used across the globe.(Users are in singapore, poland, US). At present in order to display Timezone we are manually manupulating time based on country in a enviromental file. I want to know , do we... (2 Replies)
Discussion started by: gehlnar
2 Replies

7. Shell Programming and Scripting

Help with timezone conversion

Hi, Date_ConvTZ of module Date:Manip, converts time zone to specified server but without day time savings... $mod = Date_ConvTZ($date,"$thisTZ","$serverTZ"); US and UK timezone difference is 5 hrs, but above function will return difference of 4 hrs. Please help (1 Reply)
Discussion started by: darshakraut
1 Replies

8. Red Hat

changing timezone

Hi, I would like to change time zone Linux from IST to US/Canada but not getting the option , I have run the command setup -> timezone configuration but not getting the option of us/canada or pacific us/canada. Please suggest. Regards, Manoj (1 Reply)
Discussion started by: manoj.solaris
1 Replies

9. UNIX for Dummies Questions & Answers

Find and Replace random numeric value with non-numeric value

Can someone tell me how to change the first column in a very large 17k line file from a random 10 digit numeric value to a non numeric value. The format of lines in the file is: 1702938475,SNU022,201004 the first 10 numbers always begin with 170 (6 Replies)
Discussion started by: Bahf1s
6 Replies

10. Solaris

TIMEZONE problem..

hii there... can you guys help me with TIMEZONE setting on my solaris box i tried to edit cat /etc/TIMEZONE..but i think it will work after rebooting, but something i did which took me to GMT my problem is i have this issue on a server, and i have to fix this without rebooting. thanks for... (1 Reply)
Discussion started by: 6pound
1 Replies
TIMEDATECTL(1)							    timedatectl 						    TIMEDATECTL(1)

NAME
timedatectl - Control the system time and date SYNOPSIS
timedatectl [OPTIONS...] {COMMAND} DESCRIPTION
timedatectl may be used to query and change the system clock and its settings. Use systemd-firstboot(1) to initialize the system time zone for mounted (but not booted) system images. OPTIONS
The following options are understood: --no-ask-password Do not query the user for authentication for privileged operations. --adjust-system-clock If set-local-rtc is invoked and this option is passed, the system clock is synchronized from the RTC again, taking the new setting into account. Otherwise, the RTC is synchronized from the system clock. -H, --host= Execute the operation remotely. Specify a hostname, or a username and hostname separated by "@", to connect to. The hostname may optionally be suffixed by a container name, separated by ":", which connects directly to a specific container on the specified host. This will use SSH to talk to the remote machine manager instance. Container names may be enumerated with machinectl -H HOST. -M, --machine= Execute operation on a local container. Specify a container name to connect to. -h, --help Print a short help text and exit. --version Print a short version string and exit. --no-pager Do not pipe output into a pager. The following commands are understood: status Show current settings of the system clock and RTC, including whether network time synchronization through systemd-timesyncd.service is active. Even if it is inactive, a different service might still synchronize the clock. set-time [TIME] Set the system clock to the specified time. This will also update the RTC time accordingly. The time may be specified in the format "2012-10-30 18:17:16". set-timezone [TIMEZONE] Set the system time zone to the specified value. Available timezones can be listed with list-timezones. If the RTC is configured to be in the local time, this will also update the RTC time. This call will alter the /etc/localtime symlink. See localtime(5) for more information. list-timezones List available time zones, one per line. Entries from the list can be set as the system timezone with set-timezone. set-local-rtc [BOOL] Takes a boolean argument. If "0", the system is configured to maintain the RTC in universal time. If "1", it will maintain the RTC in local time instead. Note that maintaining the RTC in the local timezone is not fully supported and will create various problems with time zone changes and daylight saving adjustments. If at all possible, keep the RTC in UTC mode. Note that invoking this will also synchronize the RTC from the system clock, unless --adjust-system-clock is passed (see above). This command will change the 3rd line of /etc/adjtime, as documented in hwclock(8). set-ntp [BOOL] Takes a boolean argument. Controls whether network time synchronization is active and enabled (if available). This enables and starts, or disables and stops the systemd-timesyncd.service unit. It does not affect the state of any other, unrelated network time synchronization services that might be installed on the system. This command is hence mostly equivalent to: systemctl enable --now systemd-timesyncd.service and systemctl disable --now systemd-timesyncd.service, but is protected by a different access policy. Note that even if time synchronization is turned off with this command, another unrelated system service might still synchronize the clock with the network. Also note that, strictly speaking, systemd-timesyncd.service does more than just network time synchronization, as it ensures a monotonic clock on systems without RTC even if no network is available. See systemd-timesyncd.service(8) for details about this. EXIT STATUS
On success, 0 is returned, a non-zero failure code otherwise. ENVIRONMENT
$SYSTEMD_PAGER Pager to use when --no-pager is not given; overrides $PAGER. If neither $SYSTEMD_PAGER nor $PAGER are set, a set of well-known pager implementations are tried in turn, including less(1) and more(1), until one is found. If no pager implementation is discovered no pager is invoked. Setting this environment variable to an empty string or the value "cat" is equivalent to passing --no-pager. $SYSTEMD_LESS Override the options passed to less (by default "FRSXMK"). $SYSTEMD_LESSCHARSET Override the charset passed to less (by default "utf-8", if the invoking terminal is determined to be UTF-8 compatible). EXAMPLES
Show current settings: $ timedatectl Local time: Thu 2017-09-21 16:08:56 CEST Universal time: Thu 2017-09-21 14:08:56 UTC RTC time: Thu 2017-09-21 14:08:56 Time zone: Europe/Warsaw (CEST, +0200) System clock synchronized: yes systemd-timesyncd.service active: yes RTC in local TZ: no Enable network time synchronization: $ timedatectl set-ntp true ==== AUTHENTICATING FOR org.freedesktop.timedate1.set-ntp === Authentication is required to control whether network time synchronization shall be enabled. Authenticating as: user Password: ******** ==== AUTHENTICATION COMPLETE === $ systemctl status systemd-timesyncd.service systemd-timesyncd.service - Network Time Synchronization Loaded: loaded (/lib/systemd/system/systemd-timesyncd.service; enabled) Active: active (running) since Mo 2015-03-30 14:20:38 CEST; 5s ago Docs: man:systemd-timesyncd.service(8) Main PID: 595 (systemd-timesyn) Status: "Using Time Server 216.239.38.15:123 (time4.google.com)." CGroup: /system.slice/systemd-timesyncd.service 595 /lib/systemd/systemd-timesyncd ... SEE ALSO
systemd(1), hwclock(8), date(1), localtime(5), systemctl(1), systemd-timedated.service(8), systemd-timesyncd.service(8), systemd- firstboot(1) systemd 237 TIMEDATECTL(1)
All times are GMT -4. The time now is 01:21 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy