'Python 3.6+ Local Time Disambiguation (PEP 495)

I have some questions regarding PEP 495.

The classes in the datetime module (well, some of them) now accept a fold argument which value is 0 by default and this value can also be set to 1.

For example, datetime.datetime(..., fold=1).

In my country (Slovenia, Central Europe) we set our time one hour ahead and one hour back between 2 AM and 3 AM. In other countries it's between 1 AM and 2 AM, I think.

1st question: Is this fold smart enough to determine if daylight-saving time is set between 2 AM and 3 AM or if it is set between 1 AM and 2 AM?

2nd question: So setting fold to 1 takes into account the daylight-saving time, right? Is that what it does?

3rd question: Is my understanding of the fold argument even correct?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source