aboutsummaryrefslogtreecommitdiff
path: root/sqlite3_fts3_test.go
diff options
context:
space:
mode:
authorAugusto Roman <aroman@gmail.com>2015-10-09 22:59:25 -0700
committerAugusto Roman <aroman@gmail.com>2015-10-09 22:59:25 -0700
commit7b0d180ce9aa2473631426dbc011e34b435d5c65 (patch)
treef27284faf4cf08ab1198ad37a141166747fc481d /sqlite3_fts3_test.go
parentAdd FTS4 unicode61 tokenizer support (diff)
downloadgolite-7b0d180ce9aa2473631426dbc011e34b435d5c65.tar.gz
golite-7b0d180ce9aa2473631426dbc011e34b435d5c65.tar.xz
Store/retrieve timezones for time.Time values.
Previously, the timezone information for a provided value was discarded and the value always stored as in UTC. However, sqlite allows specifying the timezone offsets and handles those values appropriately. This change stores the timezone information and parses it out if present, otherwise it defaults to UTC as before. One additional bugfix: Previously, a unix timestamp in seconds was parsed in the local timezone (rather than UTC), in contrast to a unix timestamp in milliseconds that was parsed in UTC. While fixing that extra bug, I cleaned up the parsing code -- no need to convert to a string and then parse it back again and risk a parse error, just to check the number of digits. The tests were extended to cover non-UTC timezones storage & retrieval, meaningful unix timestamps, and correct handling of a trailing Z.
Diffstat (limited to 'sqlite3_fts3_test.go')
0 files changed, 0 insertions, 0 deletions