I have a YeSQL query:
-- name: add-birth<!
INSERT INTO births (date_time) VALUES (:date_time)
In PostgreSQL I can enter:
INSERT INTO births (date_time) VALUES ('1967-07-31 06:30:00
America/Caracas')
... and all is well but my defquery equivalent:
(add-birth<! {:date_time "1967-07-31 06:30:00 America/Caracas"})
.... fails because the date_time string is passed to PostgreSQL as a
varchar, not a timestamp with timezone. So, to remedy this I tried
clj-time's coerce function:
(add-birth<! {:date_time (c/to-timestamp "1967-07-31 06:30:00
America/Caracas")})
.... which fails again because:
(c/to-timestamp "1967-07-31 06:30:00 America/Caracas")
.... evaluates to nil. However:
(c/to-timestamp "1967-07-31 06:30:00")
.... gives me an: #inst "1967-07-31T06:30:00.000000000-00:00" ,
whatever that is, so I checked the clj-time docs and it appears
to-timestamp doesn't handle timezones.
Any ideas?
gvim
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups "Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.