Skip to content
Snippets Groups Projects
Commit 36cac6f8 authored by Timur Safin's avatar Timur Safin Committed by Kirill Yukhin
Browse files

datetime: parse timezone abbreations

Use our own list of generated timezone names for symbol table
initialization, and then use this symbol table for datetime suffix
parsing without format.

Also, use newly integrated timezone names lookup functions in the
`tnt_strptime` if `%Z` flag was ordered. Return corresponding
`tm_gmtoff` (datetime->tzoffset) and `tm_tzindex`
(datetime->tzindex) for later consumption.

At the moment we could test only non-ambiguous abbreviations,
which might be converted to tzoffset in a deterministic way.

i.e. 'MSK' is always +0300, or 'MSD' is always +0400, but 'AT'
may be either 'Alaska Time' (-0900) or 'Atlantic Time' (-0400/-0300)
thus there is no (yet) any simple way to translate to their offset.

NO_DOC=yet
NO_CHANGELOG=yet
parent 9e645d64
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment