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.
This morning she would not heat up.
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.
Coffee was made, and the day was good.
10/10. Will read the sequel.
morning
morning
a good morning!
morning
morning
@slipset that is a great advert for understandable, repairable things
morning
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:
okay found the issue… it’s not IntelliJs fault
what was the UTF-8 problem you describe, @ramart?
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.
Is it in front of it? 😎 SCNR
yes, of course! 😄
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.
Back to ASCII-7! 😂