Closed metaperl closed 4 months ago
👋 Hi there.
Interesting. Thanks for taking a fine-toothed comb through my article 👍
Taking your remarks one-by-one:
The behavior of UTC, fixed offset, or IANA timezone datetimes is very different when it comes to ambiguity, for example.
Indeed this is not well formulated. What I should have said:
While UTC/fixed-offset and IANA timezoned datetimes are both "aware", they differ on the fundamental topic of ambiguity. While the former is always unambiguous, the latter requires disambiguation for timezone transitions (e.g. DST). When translating these concepts into Python classes, two different APIs are probably warranted.
what do you think?
You're right that it was confusing that I added this point in the "incompatible concepts" section. "incompatible concepts" clearly references naive/aware while my point about nuances in the "aware" category are not incompatibilities.
I should probably preface the paragraph better, indicating that it's a related issue—but doesn't concern 'incompatibility'
Here is my revised paragraph. What do you think?
There is another critique of this 'one class' approach: although mutually compatible, aware datetimes can take fundamentally different forms. UTC and fixed-offset datetimes are always unambiguous, while IANA timezoned datetimes require disambiguation sometimes. This warrents different APIs: One which allows users to avoid ambiguity, and another which forces users to explicitly handle it.
UTC and fixed-offset datetimes are always unambiguous, while IANA timezoned datetimes require disambiguation sometimes.
You have to forgive me. I am a professional Python developer, but I am very unfamiliar with dates and times. So, when you say " IANA timezoned datetimes require disambiguation sometimes." I am wondering:
Europe/Paris
) have different UTC offsets over time. This means, for example, that when the clock is turned back due to Daylight Savings time at 3am, the time 2:30am occurs twice (once before the clock was turned back, and one after). here is a more in-depth explanation.Closing this issue as answered. Feel free to open issues for other questions 👍
At https://dev.arie.bovenberg.net/blog/python-datetime-pitfalls/#1-incompatible-concepts-are-squeezed-into-one-class we read:
But:
Also:
what does the sentence in question have to do with a section titled "Incompatible concepts are squeezed into one class"? In my opinion, UTC, fixed offset, or IANA timezone datetimes do not represent incompatiable concepts squeezed into one class. Therefore this sentence should be removed from the document or this particular issue needs another section and with clear examples of "ambiguity" and "different behavior" to substantiate it.
As it stands right now, we have claims without examples or substantation in a section they do not belong.