Comware Based

Clock/Time configuration

 
SOLVED
Go to solution
prodigy811
Frequent Advisor

Clock/Time configuration

Hi all,

 

I am having some slight issues or I need verification on time settings. I hve configured clock and NTP etc all syncronised and looks good. The clock looks good but then when I come back a few days later the clock is an hour behind byt when I do a "dis ntp status" its still syncronised. I am wondering if it is anything to do with summer time. I am in Ireland incidentally,

My HP config; (which shows correct time now)

dis clock
13:17:02.133 IST Tue 05/18/2021
Time Zone : IST add 01:00:00

dis ntp-service status
Clock status: synchronized
Clock stratum: 2
System peer: 10.60.**
Local mode: client
Reference clock ID: 10.60.**
Leap indicator: 00
Clock jitter: 0.000092 s
Stability: 0.000 pps
Clock precision: 2^-21
Root delay: 1.11389 ms
Root dispersion: 4.50134 ms
Reference time: e44e2ed8.ace54879 Tue, May 18 2021 13:17:28.675
System poll interval: 64 s

 

My config on Cisco;

service timestamps debug datetime localtime

service timestamps log datetime localtime

clock summer-time GMT recurring last Sun Mar 2:00 last Sun Oct 2:00

clock timezone GMT 0 0

Can someone please verify that my config is correct and does it correlate with cisco config etc

Kindest regards

4 REPLIES 4
Ivan_B
HPE Pro

Re: Clock/Time configuration

Hello @prodigy811 !

How many time this event happened: "The clock looks good but then when I come back a few days later the clock is an hour behind"? Once, twice, more?

Could you post the output from "display current-config | i clock"?

Thanks!

 

I am an HPE employee

Accept or Kudo

prodigy811
Frequent Advisor

Re: Clock/Time configuration

Hi Ivan thanks for getting back as usual,

 

To be honest I am not 100% sure how many times this has happened; I would say no more than 3 times, I was convinced I configured correctly then would check logs and noticed time seemed off.

See output below;

dis current-configuration | i clock
clock timezone IST add 01:00:00
clock protocol ntp

Ivan_B
HPE Pro
Solution

Re: Clock/Time configuration

Ok, so your device knows nothing about DST. According this site https://www.timeanddate.com/time/change/ireland/dublin in Ireland you have two time zones - November-March you use GMT, April-October you use IST (add 1 hour to GMT). Currently your device always adds 1 hour, which obviously is wrong.

Remove 'clock timezone IST add 01:00:00' configuration line and if I understand the DST logic in Ireland correctly, you may add this:

clock summer-time IST 01:00:00 March last Sunday 02:00:00 October last Sunday 01:00:00

This should add one hour at 01:00 am on last Sunday of March and substract one hour at 02:00:00 on last Sunday of October.

 

I am an HPE employee

Accept or Kudo

prodigy811
Frequent Advisor

Re: Clock/Time configuration

Great stuff Ivan as per usual. Ill do that thanks