ISO 8601 with summer savings

My API represents the time for clients using ISO 8601. We have a function in which we want to display from what time it was. Purely maintaining the time zone offset, we lose track of this part.

those. Utah and Arizona observe MST -06:00for half the year, and Utah switches to MDT -07:00for the other half. Our current solution is to determine if there was a date during daylight saving time and to use time intervals *DTduring and *STotherwise, but ISO 8601 dates in Arizona will lead to Pacific Daylight Saving Time.

Is there a way to determine if summer savings are maintained in ISO 8601 format? Like 2016-01-11T13:00:04Z DST0or something like that?

+4
source share
2 answers

I could not find a way to do this well using ISO8601 or RFC2822. I keep in the data base MySql - time, called "TV Time" in this article fooobar.com/tags/timezone / ... . TV time is a different offset from UTC during summer savings compared to when it is not summer time, but it is mentioned by my users at the same time. EG: "I start work at 9 a.m.", not "I start work at 22:00 p.m. in the summer and at 21:00 p.m. in the winter."

( "tzid" ) tzid https://unicode.org/cldr/charts/latest/supplemental/zone_tzid.html ( PHP DateTimeZone:: listAbbreviations() ). DateTime mysql

"-" datetime, . - , UTC tzid.

0

, ISO 8601: 2004 : ISO 8601-1: 201x ( ) ISO 8601-2: 201x ( , , , ..). Google 'iso 8601 pdf' ISO 8601-1 ISO 8601-2. 2016 , - ANSI - ISO 8601: 2004 ( ), - - ISO 8601: 2004.

, UTC (±1030 ±10:30 ) Z ( UTC, Zulu - Z Zulu ).

, ISO 8601.

, . , 2018 , " " ; , . IANA- ( ) "" ( . . ). TZDB https://www.iana.org/time-zones. , : ( ) ( , ). Unicode Consortium CLDR ( Common Locale Data Repository), ( , , ).

. ( ), - , , . , , . , UTC, . , /, , 100% . (, - -, , , , - ?)

0

Source: https://habr.com/ru/post/1623827/


All Articles