Is timezone just an offset number or “more information”?

后端 未结 3 619
执念已碎
执念已碎 2021-01-20 16:48

I live in a country where they change the time twice a year. That is: there is a period in the year when the offset from UTC is -3 hours (-180 mins) and other period where t

3条回答
  •  傲寒
    傲寒 (楼主)
    2021-01-20 17:44

    that is: my country has two timezones? or the timezone includes this information?

    The term "timezone" usually includes that information. For example, in Java, "TimeZone represents a time zone offset, and also figures out daylight savings" (link), and on Unix-like systems, the tz database contains DST information.

    However, for a single timestamp, I think it's more common to give just a UTC offset than a complete time-zone identifier.

    […] in my database.

    Naturally, you should consult your database's documentation, or at least indicate what database you're using, and what tools (e.g., what drivers, what languages) you're using to access it.

提交回复
热议问题