bodega and UTC

Aaron J. Seigo aseigo at kde.org
Thu May 30 23:02:15 UTC 2013


hi ...

i just pushed some changes to bodega that forces the server to run in UTC. 
this was accomplished by setting the env's tz to 'UTC' in app.js

the server also now expects dates and times to be fetched from the database in 
UTC. the easiest way to achieve that is to edit postgresql.conf and make sure 
that "timezone = 'UTC'" (it defaults to posixrules .. which means the local 
timezone of the machine) and then restart postgresql.

the less easy way would involve a small patch to bodegadb.js when creating the 
db connection to first do a "SET time zone 'utc'".

these changes will ensure that all dates and times in the database will be 
stored and retrieved sensibly even if the server changes its timezone. it also 
means we can reliably run the test suite in different timezones. the stats 
test, for instance, should now work as well in Phillie as it does in Zürich ;)

-- 
Aaron J. Seigo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/active/attachments/20130531/f4c26264/attachment.sig>


More information about the Active mailing list