Support Support Downloads Knowledge Base Juniper Support Portal Community

Knowledge Base

Search our Knowledge Base sites to find answers to your questions.

Ask All Knowledge Base Sites All Knowledge Base Sites JunosE Defect (KA)Knowledge BaseSecurity AdvisoriesTechnical BulletinsTechnotes Sign in to display secure content and recently viewed articles

Changing the time zone in Junos Space

0

0

Article ID: KB22923 KB Last Updated: 13 Apr 2020Version: 5.0
Summary:

This article provides information on how to change the time zone settings on the Junos Space Server.

Symptoms:
  • How do I change the time zone settings on the Junos Space Server?
  • The date and hwclock don't match.
  • How do I sync the sysclock to the hwclock?
Cause:

The time zone of Junos Space may have to be changed for the localized deployment.

Solution:

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".

  1. On the Junos Space Settings Menu, enter 3 at the prompt.  The Change Time Options menu is displayed.


     
     

  2. To change the time zone, type 1 and follow the prompts on the CLI.
  3. 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.

Option II - CLI Commands:
  1. Check if the time is correct. Note: date and hwclock should match.
    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
  2. If they do not match, set the correct system time and then sync them (all dates are UTC at this point).
    command syntax:
    date [MMDDhhmm[[CC]YY][.ss]]

    Example:

    1. 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
    2. Check the hwclock
      [root@space-005056980055 etc]# hwclock
      Wed 07 Dec 2011 06:13:59 PM UTC -0.828736 seconds
    3. 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

       
  3. Change the time zone, if required:
    1. Find the time zone file.  look in /usr/share/zoneinfo/ **/ ** for the required time zone file.
    2. 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
    3. 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]#
  4. Restart opennms on the node to pick up the newly configured time zone.
Modification History:
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

Related Links

Comment on this article > Affected Products Browse the Knowledge Base for more articles related to these product categories. Select a category to begin.

Getting Up and Running with Junos

Getting Up and Running with Junos Security Alerts and Vulnerabilities Product Alerts and Software Release Notices Problem Report (PR) Search Tool EOL Notices and Bulletins JTAC User Guide Customer Care User Guide Pathfinder SRX High Availability Configurator SRX VPN Configurator Training Courses and Videos End User Licence Agreement Global Search