zlacker

[parent] [thread] 3 comments
1. candid+(OP)[view] [source] 2025-08-22 12:24:24
The way Go parses time strings by default is insane though, even the maintainers regret it. It's a textbook example of being too clever.
replies(1): >>nkozyr+ss
2. nkozyr+ss[view] [source] 2025-08-22 14:57:21
>>candid+(OP)
By choosing default values instead of templatized values?

Other than having to periodically remember what 0-padded milliseconds are or whatever this isn't a huge deal.

replies(1): >>mdanie+vz
◧◩
3. mdanie+vz[view] [source] [discussion] 2025-08-22 15:34:14
>>nkozyr+ss
I'm not OP, but I also got tripped up the first time I saw time.Parse("2006-01-02 03:04:05") and was like what the actual?!

https://pkg.go.dev/time#Layout

replies(1): >>petera+fZ4
◧◩◪
4. petera+fZ4[view] [source] [discussion] 2025-08-24 09:40:33
>>mdanie+vz
Yeah, that's ugly as fuck. I hate it
[go to top]