문제

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?

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top