Comware Based
1752689 Members
5496 Online
108789 Solutions
New Discussion юеВ

Re: NTP and time change

 
Ricou69
Advisor

NTP and time change

Hi everyone,

I have a mistake for the time management on our switchs. I configured the NTP service like this : ntp-service unicast-server X.X.X.X

But the system time on the switch has 2 hours late. Actually it's 11:27 but on the switch it's 09:27.

I'm in France and we change to the summer time in March (+1 hour) and to the winter time in October (-1 hour) each year.

How can i put the good time ? I saw the commands "clock summer-time ..." and "clock timezone ...". But must I manually change the year in the command "clock summer-time ..." each year ?

Cordially.

21 REPLIES 21
parnassus
Honored Contributor

Re: NTP and time change

Can you specify which HPE/Aruba Switch(es) are you speaking about?


I'm not an HPE Employee
Kudos and Accepted Solution banner
VoIP-Buddy
HPE Pro

Re: NTP and time change

Hi Parnassus!

It sounds to me like a Comware switch.  It shouldn't matter what switch it is for ntp on a Comware device.  The commands are all there.

Since the clock is 2 hours off, that is a much bigger time change than ntp is allowed to make.  The way to fix this is to shut off ntp, manually set the time, and then turn ntp back on.

Assuming this is a Comware switch:

  • sys
  • undo ntp-service unicast-peer (or server) whatever is configured
  • quit
  • Use the clock datetime command to manually set the clock
  • You can also use the clock timezone command to set up your timezone at this point
  • sys
  • re-enable the ntp server or peer with the ntp-service command and you should be good to go
  • save the configuration so it isn't lost

David

 

I work for HPE in Aruba Technical Support
parnassus
Honored Contributor

Re: NTP and time change

What is the output of display ntp-service sessions, display clock and display ntp-service status CLI commands?

Since NTP uses UTC you should probably use the clock timezone CET add 01:00:00 (CET is UTC+1 for France between 01/01/2017 and 26/03/2017 and during 29/10/2017 and 31/12/2017; CEST is UTC+2 for France during summer time in between) and the clock summer-time CEST repeating 02:00:00 2000 March last Sunday 02:00:00 2000 October last Sunday  01:00:00 CLI commands to set respectively your Timezone and summertime.

After that check your local time with the display clock command again to see if it matches with your local time in France.


I'm not an HPE Employee
Kudos and Accepted Solution banner
parnassus
Honored Contributor

Re: NTP and time change


VoIP-Buddy wrote: Since the clock is 2 hours off, that is a much bigger time change than ntp is allowed to make.

Is that true even if the offset (reported: 2 hours) is exactly equal to the time offset between UTC versus CEST time in France as of today (Summer time)? ...that time offset is exactly 2 hours now (see here).

I mean: NTP client on the Switch appears synchronized...but it is so only against UTC clock because NTP synchronize on UTC...the OP just need to fix the Switch timezone/summertime if he need to see the Switch's clock referring to CET/CEST instead of just UTC.

NTP isn't un-synchronized with an offset so large...or am I missing something?


I'm not an HPE Employee
Kudos and Accepted Solution banner
VoIP-Buddy
HPE Pro

Re: NTP and time change

Hi Parnassus!

There are two things working here.  NTP base time is UTC.  You then need to set the timezone to convert it to local time.  If the UTC is 2 hours off you will have to set the time closer to the real time so that NTP can sync.

I wasn't sure if NTP was synchronized at the UTC or if it was 2 hours off from UTC.  Maybe we'll get some more information from the original poster to make it more clear.

Regards,

David

I work for HPE in Aruba Technical Support
parnassus
Honored Contributor

Re: NTP and time change

Yep see my above post...the only thing I wasn't aware is that NTP client service should be shutted down and then bring back on again to force a re-synch if the time offset is *so* large that can't be automatically managed correctly (clearly if the issue is only UTC versus CEST/CET, NTP synchronization is not *the* issue). Let we see what OP will report back to us.


I'm not an HPE Employee
Kudos and Accepted Solution banner
16again
Respected Contributor

Re: NTP and time change

try:

time timezone 60
timesync sntp
sntp unicast
sntp server priority 1 x.x.x.x
time daylight-time-rule Western-Europe

Ricou69
Advisor

Re: NTP and time change

Thanks for your answers.

Our models of switches are 5500 and 3600 series, so 3com.

If i understand, i must change the year with the commande "clock summer-time..." each year ?

VoIP-Buddy
HPE Pro

Re: NTP and time change

No, this is not something that you need to do every year.  If the clock is way out of sync with real time, you need to manually set the clock so that it is much closer to the real time and then restart ntp.  Once you do that, ntp should be able to sync the time with your time server and you should be good going forward.

Regards,

David

I work for HPE in Aruba Technical Support