Score:0

Propagate local time over NTP to LAN

gb flag

I have synchronized my L3 switch to an external time server, this is working correctly. However I'm in Europe and we have CET/CEST switching and I get UTC from the configured time server. I did setup the timezone and the summer-time in my switch (shows the correct time when I use "show clock"), but my switch propagates the NTP (UTC) time towards my LAN. (I know this is the normal operation)

My question is, can I propagate with NTP the local (CET/CEST) time towards my LAN clients, or are there any other method to do this? The problem I have that I can't setup CET/CEST switching on my clients, they do not support this. (I have PLCs in my LANs, and they're only capable of GMT settings)

Are there any solution for this, or I must use a separate time source?

Thank you very much!

jp flag
First of all, GMT != UTC! But I think this wasn't your question.
Score:2
cn flag

can I propagate with NTP the local (CET/CEST) time towards my LAN clients, or are there any other method to do this?

No, not with NTP. NTP has no concept of local time at all, its all UTC. All the packet contains is a few time stamps with seconds and fractions of a second from an epoch.

Do not attempt to configure "wrong" offset NTP servers to do local time zone offsets. I have never seen this work, it makes good robust NTP configurations difficult.

General purpose computers have (and keep updated) a tz database such that they can be configured with say Europe/Berlin and have correct local time even when the rules change.

A rugged, embedded, or otherwise dumb computer may not have a tzdata package, or a means to update it, or reasonable time and date software. Almost certainly your PLC is lacking some of these. That KB article on how to sync time to controllers is missing details on what format or time zone everything is in, which doesn't raise my confidence that internally is a reasonable UTC clock with time zone offsets.

Unfortunately your options may be limited to exporting data to a system with a full featured clock, leaving it on UTC forever, or cursing daylight savings time every year when fixing offsets.

B3ne avatar
gb flag
Thank you very much, this was really helpful! I must have to do that somehow, so I think I will create my own local time with one of the PLCs then and propagate it through Ethernet/IP.
Score:0
jp flag

Of course you can propagate whatever time zone's time through NTP, you just need to make sure

  • there will be only 1 time source on your LAN to mitigate the danger that your clients will receive conflicting timestamp messages and switch back and forth
  • your time source will broadcast the time in the time zone you intend to

In other words: If the time source in your LAN is the L3 switch, this would be the device which either has a setting to "traslate" the time zone for NTP clients or not. In case your L3 switch isn't capable of that, you will need a different time source which is.

B3ne avatar
gb flag
Do you know a method for this using Cisco IE-2000 or you suspect that I should use a separate device?
jp flag
IIUC, the IE-2000 is running Cisco IOS (not to bei confused with iOS). I cannot find anything in IOS docs which seems to help and you cannot run any own code on IOS. So sounds to me like you will need a separate device.
jp flag
IIUC, the IE-2000 is running Cisco IOS (not to bei confused with iOS). I cannot find anything in IOS docs which seems to help and you cannot run any own code on IOS. So sounds to me like you will need a separate device.
jp flag
Are you sure your PLCs' NTP client implementation is that incomplete it cannot handle time zones properly? What make or model would that be?
B3ne avatar
gb flag
Omron NJ/NS series, as you can see in the link below you can only modify the time zone, but can't change anything related to DST. https://www.myomron.com/index.php?action=kb&article=1556
jp flag
Two links: https://automation.omron.com/en/mx/support/resources/sample-code/nx-nj-daylight-savings-time-adjustment-sample-code-project and https://forums.mrplc.com/index.php?/topic/26468-etn21-time-sync-and-dst/ No idea what an FB would be, though.
jp flag
Are you sure the PLC does not know to handle DST or is that just your assumption?
B3ne avatar
gb flag
I'm sure it doesn't know how to handle it, I will do that compensation with a function and pass that compensated time through Ethernet/IP to my other devices.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.