This article provides information on how to change the time zone settings on the Junos Space Server.
The time zone of Junos Space may have to be changed for the localized deployment.
There are two options to change the time zone via the CLI:
Option I - Junos Space Settings Menu:
When you log in to the appliance/vm instance, the Junos Space Settings Menu appears as follows: Note: The command " jmp_setup " can aso be executed from the operation prompt to get the Settings menu. You can change the time zone, add or delete an NTP server, and enable or disable an NTP server by selecting the "Change Time Options". On the Junos Space Settings Menu, enter 3 at the prompt. The Change Time Options menu is displayed. To change the time zone, type 1 and follow the prompts on the CLI. Type A to apply all the changes that you made, or type M to return to the Junos Space Settings Menu without applying the changes.
When you log in to the appliance/vm instance, the Junos Space Settings Menu appears as follows:
You can change the time zone, add or delete an NTP server, and enable or disable an NTP server by selecting the "Change Time Options".
Example : [root@space-005056980055 etc]# date Wed Dec 7 01:12:31 UTC 2011 [root@space-005056980055 etc]# hwclock Wed 07 Dec 2011 06:10:53 PM UTC -0.106857 seconds
[root@space-005056980055 etc]# date Wed Dec 7 01:12:31 UTC 2011 [root@space-005056980055 etc]# hwclock Wed 07 Dec 2011 06:10:53 PM UTC -0.106857 seconds
command syntax: date [MMDDhhmm[[CC]YY][.ss]] Example : Set and check the date for UTC: [root@space-005056980055 etc]# date 120701152011 Wed Dec 7 01:15:00 UTC 2011 [root@space-005056980055 etc]# date Wed Dec 7 01:15:02 UTC 2011 Check the hwclock [root@space-005056980055 etc]# hwclock Wed 07 Dec 2011 06:13:59 PM UTC -0.828736 seconds Sync sysclock to hwclock: [root@space-005056980055 etc]# hwclock –-systohc [root@space-005056980055 etc]# date Wed Dec 7 01:15:55 UTC 2011 [root@space-005056980055 etc]# hwclock Wed 07 Dec 2011 01:15:59 AM UTC -0.188099 seconds
date [MMDDhhmm[[CC]YY][.ss]]
Example :
[root@space-005056980055 etc]# date 120701152011 Wed Dec 7 01:15:00 UTC 2011 [root@space-005056980055 etc]# date Wed Dec 7 01:15:02 UTC 2011
[root@space-005056980055 etc]# hwclock Wed 07 Dec 2011 06:13:59 PM UTC -0.828736 seconds
[root@space-005056980055 etc]# hwclock –-systohc [root@space-005056980055 etc]# date Wed Dec 7 01:15:55 UTC 2011 [root@space-005056980055 etc]# hwclock Wed 07 Dec 2011 01:15:59 AM UTC -0.188099 seconds
Find the time zone file. look in /usr/share/zoneinfo/ **/ ** for the required time zone file. Set the link to your local time zone (example used here is Los Angeles): mv /etc/localtime /etc/localtime.orig ln -s /usr/share/zoneinfo/America/Los_Angeles /etc/localtime Check: [root@space-005056980055 etc]# mv /etc/localtime /etc/localtime.orig [root@space-005056980055 etc]# ln -s /usr/share/zoneinfo/America/Los_Angeles /etc/localtime [root@space-005056980055 etc]# mv /etc/sysconfig/clock /etc/sysconfig/clock.orig [root@space-005056980055 etc]# date Tue Dec 6 17:20:36 PST 2011 [root@space-005056980055 etc]# hwclock Tue 06 Dec 2011 05:20:40 PM PST -0.947617 seconds [root@space-005056980055 etc]#
/usr/share/zoneinfo/ **/ **
mv /etc/localtime /etc/localtime.orig ln -s /usr/share/zoneinfo/America/Los_Angeles /etc/localtime
[root@space-005056980055 etc]# mv /etc/localtime /etc/localtime.orig [root@space-005056980055 etc]# ln -s /usr/share/zoneinfo/America/Los_Angeles /etc/localtime [root@space-005056980055 etc]# mv /etc/sysconfig/clock /etc/sysconfig/clock.orig [root@space-005056980055 etc]# date Tue Dec 6 17:20:36 PST 2011 [root@space-005056980055 etc]# hwclock Tue 06 Dec 2011 05:20:40 PM PST -0.947617 seconds [root@space-005056980055 etc]#
2020-04-13: In the solution option II, item number 3.C, corrected the command from hwclockTue to hwclock Tue. 2019-03-27: Added the time zone option from the Settings menu