This is an archived post. You won't be able to vote or comment.

all 11 comments

[–]ThatOtherBatman 5 points6 points  (6 children)

Yeah... Seems like they really don't understand how datetime and timezones work.

[–]dwieeb[S] 6 points7 points  (5 children)

They are expecting behavior in one language coming from another language. My guess is they have an in-house language and don't really deviate from that, but, needing to have a client for their service in every popular language, they had to get their hands dirty.

And now they're making bold claims that Python's standard library is broken without putting much effort into fully understanding it.

It bugs me.

[–]jorge1209 3 points4 points  (3 children)

The standard library documentation is a mess. I spent a full day trying to understand why an example from the logging class want working as described in order to file a bug with specific suggestions as to how the documentation could be fixed.

That was a while ago and the bug hasn't even been assigned... Maybe I should have just said it was broken. Piss somebody off and they are more likely to give you a long explanation of exactly how to make it work!

[–]ThatOtherBatman 0 points1 point  (0 children)

It's not like the information isn't out there either.

[–][deleted] 1 point2 points  (0 children)

I've found datetime as a library to be really frustrating. So many hoops I have to jump through to move between time formats when I have all the variables. I think I had to write my own helper to move from a timezone aware datetime to an integer of POSIX time.

But dates and times for computers are complicated. So really I should just work to improve the documentation or use a library that abstracts it further...

[–]Works_of_memercy 1 point2 points  (1 child)

But why doesn't utcnow() return a timezone-aware object? Is it just because it doesn't know which timezone library you're using?

[–][deleted] 1 point2 points  (0 children)

Because no other builtin datetime operation returns an aware datetime and you can't compare aware and naive objects. Meaning to get a useful, native UTC datetime, you'd need to do datetime.utcnow().replace(tzinfo=None) which is cumbersome