This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-01-14
Channels
- # beginners (33)
- # cider (17)
- # clara (13)
- # cljs-dev (7)
- # clojars (1)
- # clojure (47)
- # clojure-brasil (1)
- # clojure-dev (4)
- # clojure-italy (3)
- # clojure-russia (4)
- # clojure-uk (1)
- # clojurescript (4)
- # core-async (4)
- # core-logic (6)
- # cursive (7)
- # datomic (1)
- # emacs (35)
- # fulcro (56)
- # hoplon (7)
- # jobs-discuss (89)
- # lumo (6)
- # numerical-computing (1)
- # onyx (86)
- # parinfer (3)
- # reagent (2)
- # rum (2)
- # specter (5)
- # sql (13)
- # unrepl (2)
im seeing a weird issue when inserting dates into postgresql…. i’m using clj-time to parse dates in the format yyyy-MM-dd
and coerce to sql time…i print out that object and it appears correct (eg. 2018-01-02
ends up as #inst "2018-01-02T00:00:00.000000000-00:00"
), however somewhere between clojure and postgresql the timezone ends up…elsewhere.
What is the data type of the column in your DB @jgh?
Also, is your DB local or on another server? Are the timezones the same between your JVM/application and your PostgreSQL server?
clj-time
is going to give you a UTC date/time so that is your problem.
You need the server on UTC and the JVM and the database -- those can be separate settings -- and the client app that is talking to the DB also needs to be in UTC.
Timezones suck :):