0

I have Wifi router and server that a number of devices connect to on a ship. The devices are both mobile(iOS, Android) and laptops. Connections are so that the devices can only access a specific website on the server.

The location of the devices change but I need to allow manually be able to change the time zone of the devices so that we are all using the same time. In other words I want to be able to manually change the time zone on the router or server so that all the devices use the same time zone.

How do I ensure all the devices automatically update the time zone from my server or router?

Karlth
  • 191
  • 7
  • 1
    When everything is configured with DHCP: there is an extension that allows providing the current time zone https://www.lorier.net/docs/dhcp-timezone.html with the caveat *"As usual, not many DHCP clients automatically know what to do with these options"* so your mileage may vary – diya Sep 16 '22 at 13:45

2 Answers2

1

I don't think this is feasible.

  • Android (and I assume iOS as well) devices automatically change the timezone depending on the geolocation, but this doesn't work on laptops that don't have GPS receivers
  • you could set up an NTP server that has the time of the timezone, but that has other downsides
    • NTP always assumes that the transmitted time is UTC
    • it would mess with location aware devices, which will not know that the NTP servers time is not really UTC
    • you don't have any control over WHEN the clients update the time from the NTP server; changes will not be instantaneous when you cross into a new timezone

So, you could hack an NTP server into transmitting the time to laptops, but won't have any control when it does that because the time is requested by the client, not sent by the server. You could leave location aware devices as they are, since they already switch the timezone by themselves. As long as they can receive GPS signals, that is.

Gerald Schneider
  • 19,757
  • 8
  • 52
  • 79
  • The problem is that the ship has its own timezone that doesn't exactly follow the GPS timezone. So it needs to keep the timezone for the rest of a day even if a boundary is crossed at midday. If airplane mode is on (as it should be) doesn't the phone use GPS location set by the the router? Would that fool the mobile devices? – Karlth Sep 16 '22 at 21:33
  • 1
    No. Airplane mode does not affect GPS. The information about the timezone of the ship would have been useful in the question. – Gerald Schneider Sep 17 '22 at 04:59
0

That depends on the type of router. Many routers are actually Linux appliances (Openwrt or other). Maybe you have SSH/console access and you can install packages. If you can, then set up an NTP service on the router, and install an NTP client on the devices. You will need to provide the IP address (or host name) in the client config file, since the default lists of NTP servers would require Internet access.

If you cannot do any customization on the router then install a small, dedicated server that is available to all devices. When I say server, it could be a Raspberry PI + optional enclosure and you put all that in a secure rack somewhere.

Perhaps the server could do much more, like monitoring of the devices and this could be an opportunity to improve the management of your infrastructure, not to mention security and software updates.

Kate
  • 453
  • 3
  • 7