This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-09-02
Channels
- # announcements (2)
- # babashka (21)
- # beginners (80)
- # bristol-clojurians (1)
- # calva (1)
- # cider (4)
- # clara (2)
- # clj-kondo (5)
- # cljs-dev (41)
- # clojure (8)
- # clojure-dev (2)
- # clojure-europe (28)
- # clojure-italy (11)
- # clojure-nl (4)
- # clojure-spec (13)
- # clojure-sweden (1)
- # clojure-uk (11)
- # clojuredesign-podcast (5)
- # clojurescript (5)
- # code-reviews (4)
- # cursive (25)
- # data-science (5)
- # datomic (25)
- # duct (15)
- # emacs (6)
- # fulcro (13)
- # graalvm (1)
- # graphql (5)
- # helix (2)
- # jobs (3)
- # jobs-discuss (4)
- # luminus (1)
- # malli (13)
- # meander (3)
- # off-topic (16)
- # pathom (2)
- # pedestal (1)
- # re-frame (5)
- # ring-swagger (3)
- # spacemacs (4)
- # sql (16)
- # tools-deps (1)
- # tree-sitter (8)
- # vrac (2)
- # xtdb (16)
- # yada (2)
So, here's a short little story about a morning that could've turned this day and the following days into a true disaster.
Every morning, I start my day with a nice cup of cafe au lait from my trusty old Silvia. She's been serving us well for almost 10 years.
I was petrified. A morning without coffee, a lunch without coffee, and then it dawned upon me. She might have to be repaired at a shop, which would mean weeks without decent coffee.
But luckily, Silvia is engineered in the finest of ways. She's composed of simple, small building blocks, one of which is a fuse.
I decomposed her slightly, got access to her fuse, reset it, and bang she was hot again.
wow all of this date-time handling is driving me nuts. will there ever be the magical moment where, all of a sudden, everything appears clear and understandable?
I encountered something similar: I added this to my project.clj
: https://gist.github.com/ekoontz/3c80b084e48fc47c6a8a1482defd3107
why do I receive a UTC time stamp, convert it to a UTC date for Postgres, PG has the UTC timezone set, but when I query my timestamps they are off by -2hrs?
huh, what… does IntellIJ also convert timezones in the sql output?? :man-facepalming:
what I didn’t know: apparently the pg-jdbc driver subtracts the local timezone from a LocalDateTime object to store it as a UTC timestamp
i was sending a UTC date, and Postgres (or the driver?) subtracted the local TZ from it :man-facepalming:
DateTime is really PITA. But Encoding is also: e.g. "I have a UTF-8 string, the JDBC-Connection is set to UTF-8, the database is set to UTF-8, the console is set to UTF-8 and even the used font is able to render UTF-8. Why the f... do I see nothing but garbage?" It's always "fun" to debug this. And it's really too hard for newbies.
what was the UTF-8 problem you describe, @U1Z4D5SSV?
It depends. 😁 I'm the one helping to hunt these bugs down. If one of my colleagues states "I have a UTF-8 string..." I ask "How do you know?". Sometimes the source code file isn't UTF-8, so his/her assumption was wrong. Or it looks like an UTF-8 string in the debugger, but the debugger lies right into your face. Just too many layers of encoding and decoding when watching at a simple string on your screen.