Guido van Rossum wrote: > Sent: Tuesday, December 11, 2012 4:11 PM > To: Antoine Pitrou > Cc: python-dev at python.org > Subject: Re: [Python-Dev] Draft PEP for time zone support. > > On Tue, Dec 11, 2012 at 8:07 AM, Antoine Pitrou <solipsis at pitrou.net> > wrote: > > Le Tue, 11 Dec 2012 16:23:37 +0100, > > Lennart Regebro <regebro at gmail.com> a écrit : > >> > >> Changes in the ``datetime``-module > >> -------------------------------------- > >> > >> A new ``is_dst`` parameter is added to several of the `tzinfo` > >> methods to handle time ambiguity during DST changeovers. > >> > >> * ``tzinfo.utcoffset(self, dt, is_dst=True)`` > >> > >> * ``tzinfo.dst(self, dt, is_dst=True)`` > >> > >> * ``tzinfo.tzname(self, dt, is_dst=True)`` > >> > >> The ``is_dst`` parameter can be ``True`` (default), ``False``, or > >> ``None``. > >> > >> ``True`` will specify that the given datetime should be interpreted > >> as happening during daylight savings time, ie that the time > specified > >> is before the change from DST. > > > > Why is it True by default? Do we have statistics showing that Python > > gets more use in summer? > > My question exactly. "Summer" in the USA, at least, is 238 days in 2012, while "Winter" into 2013 is only 126 days: >>> import datetime >>> datetime.date(2012, 11, 4) - datetime.date(2012, 3, 11) datetime.timedelta(238) >>> datetime.date(2013, 3, 10) - datetime.date(2012, 11, 4) datetime.timedelta(126) Robert Brewer fumanchu at aminus.org
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4