Timezone handling

Julien Danjou julien at danjou.info
Tue Jul 23 22:39:59 UTC 2013


Hi there,

I'm struggling with timezone handling in Postmodern. I'm using timestamp
with time zone column types, and I'm looking for the correct way to feed
postmodern such information on insert. Basically, I don't see any class
that would fit. I've tried to grep through the code but didn't find much
about timestamp/timezone handling.

Concretely, I'm having UTC timestamp that I want to insert into those
timestamp-with-time-zone columns, but I don't know how to tell
Postmodern that it should postfix them with something like +00 so PG
understand it should not default them to its default timezone.

On the same topic, I thought that one easy solution would be to set the
session timezone to UTC. It's easy enough to come with a macro doing a
SET TIMEZONE='UTC' before each request, but honestly, I'd like to avoid
that and do it only at connection time.
Now, I've read through cl-postgres code, and I was hoping being able to
plug my code at connection time, but it seems everything is defined as
function and not as method, which seems weird to me, and not really
pluggable in the end.

Any hint appreciated!

Cheers,
-- 
Julien Danjou
;; Free Software hacker ; freelance consultant
;; http://julien.danjou.info
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/postmodern-devel/attachments/20130724/ba72609d/attachment.sig>


More information about the postmodern-devel mailing list