Work to add UTC tracking to wall-times
authorRuss Tyndall <russ@acceleration.net>
Sun, 4 Feb 2018 19:43:58 +0000 (14:43 -0500)
committerRuss Tyndall <russ@acceleration.net>
Tue, 6 Feb 2018 16:46:53 +0000 (11:46 -0500)
commit67a4ab3576b630b8d34a6476ec8c1e9dfa913800
tree99df530676c6e9864bb77c1a2e42c25b619e3f88
parentade04fc6aa18497812f74950f2b10c23fbb5bf68
Work to add UTC tracking to wall-times

 * We handle timezones by converting to UTC time during parse
 * Ends up leaving wall-times that look like locatimes,
   but are UTC
 * Causes times to advance by zone-offset every read/write
   to a timezone aware database (postgresql-socket3)
 * To prevent this we will track whether a date will be in UTC
   or is a local time.  When writing out UTC timestamps we add a Z to
   the end
 * During comparison, we always convert to UTC to compare,
   we assume zoneless timestamps are localtimes

There was a lot of personal debate about how to do this. I think a
better answer would be to fully replace clsql-date/times with the
local-time library which has a more comprehensive handling of dates
and times.

re ADWolf:#1408
ChangeLog
clsql.asd
db-postgresql-socket3/sql.lisp
sql/time.lisp
tests/test-init.lisp
tests/test-time.lisp
tests/utc-time-compare.lisp [new file with mode: 0644]