Open jaesung9507 opened 2 months ago
why is it necessary to expose this data? and from the looks of it, just extends is insufficient to describe all the time zone transitions correctly?
@seankhliao This value is used to transmit this value to IoT devices that do not have time zone information. Why not simply provide this value to those who need it?
I don't think that's sufficient information to capture zone transitions, exposing it doesn't seem appropriate if it's incomplete.
I agree that just the extend string is not enough to handle timezone transitions. It only predicts future transitions, it doesn't cover past ones.
In any case this seems like something that belongs more in a third party library.
I understand that the extend string may not capture all zone transitions comprehensively. However, the ability to predict future transitions still holds significant value.
While it is true that the extend string focuses on future transitions and may not cover past ones, this limitation can be clearly documented.
To provide zone info to the device, do we have to display the current zone location ?
Varsayılan bölge olarak
Proposal Details
When zoneinfo is needed, it is parsed from the files in the
/usr/share/zoneinfo/
directory. This implementation works only on Unix systems. I recently discovered that this value is stored in theextend
field of thetime.Location
struct. I use this value to send to other devices.I propose adding a getter function to retrieve this value:
func (l *Location) Extend() string