Re: [Datetime-SIG] Local time disambiguation proposal

On 7/30/2015 14:08, Alexander Belopolsky wrote:
On Thu, Jul 30, 2015 at 1:46 PM, Alexander Walters tritium-list@sdamon.com wrote:
'.is_dst' of one spelling or another is unambiguous;
.. and is "clearly" defined by the POSIX standard as follows:
"A positive or 0 value for tm_isdst shall cause mktime() to presume initially that Daylight Savings Time, respectively, is or is not in effect for the specified time. A negative value for tm_isdst shall cause mktime() to attempt to determine whether Daylight Savings Time is in effect for the specified time." [1]
Call me when you find two people who can agree on what this means.
We are not talking about implementing the POSiX argument to mktime, and I dont think anyone on the list ever was. .is_dst is a bool flag for 'if set, the time represented is in the DST time, if not set, it is in the non-DST time'.
'.first' doesnt even imply a bool. "First what?" someone might ask.

On Thu, Jul 30, 2015 at 2:15 PM, Alexander Walters tritium-list@sdamon.com wrote:
We are not talking about implementing the POSiX argument to mktime, and I dont think anyone on the list ever was. .is_dst is a bool flag for 'if set, the time represented is in the DST time, if not set, it is in the non-DST time'.
'.first' doesnt even imply a bool. "First what?" someone might ask.
I have no emotional attachment to any particular name. If you like "is_first" better than "first" on the grammatical grounds - I have no problem changing the spelling.
I do have two problems with calling it isdst:
1. Whether we want to implement the POSIX standard or not, but tm_isdst member is the POSIX solution to the problem at hand and if we give datetime objects a member variable called isdst, but change the semantics, we will see no end of bug reports. (And since no one understands POSIX semantics, we have no choice but to change them. :-)
2. It will be very confusing to have t.is_dst ≠ t.dst() which will happen whenever you have an ambiguity due to a change in the standard time.
participants (2)
-
Alexander Belopolsky
-
Alexander Walters