Frage

I'm working on an embedded platform based on unix. Is it possible to set the ntp time to a specific timezone and get information about the country the device is located at?

War es hilfreich?

Lösung

An NTP timestamp represents the number of seconds since 00:00 on January 1, 1900 (70 calendar years before the traditional Unix epoch of 1970-01-01).

This base time is GMT / UTC, so it doesn't contain any time zone information.

Unix-like systems conventionally represent times in UTC, and convert that to the local time zone as needed.

Time zone information therefore has to be maintained separately.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top