Re: datetime seems to be broken WRT timezones (even when you add them)

2020-02-10 Thread Chris Angelico
On Tue, Feb 11, 2020 at 12:31 PM Python wrote: > > On Tue, Feb 11, 2020 at 11:33:54AM +1100, Chris Angelico wrote: > > [...] instead of using the undocumented and unsupported strftime %s > > format code > > I'm not sure this characterization is accurate... the docs (for both > Python 2 and 3) say:

Re: datetime seems to be broken WRT timezones (even when you add them)

2020-02-10 Thread Python
On Tue, Feb 11, 2020 at 11:33:54AM +1100, Chris Angelico wrote: > [...] instead of using the undocumented and unsupported strftime %s > format code I'm not sure this characterization is accurate... the docs (for both Python 2 and 3) say: The full set of format codes supported varies across pl

Re: datetime seems to be broken WRT timezones (even when you add them)

2020-02-10 Thread Jon Ribbens via Python-list
On 2020-02-10, Python wrote: > So far, so good. However, when you go to use this object, the time it > represents is in fact wrong. Unsurprisingly for a language feature that's been around for nearly 17 years, no it isn't. > For example: > print dt.strftime("%s") > 1580452245 That's askin

Re: datetime seems to be broken WRT timezones (even when you add them)

2020-02-10 Thread Chris Angelico
On Tue, Feb 11, 2020 at 11:17 AM Python wrote: > > On Tue, Feb 11, 2020 at 11:04:28AM +1100, Chris Angelico wrote: > > On Tue, Feb 11, 2020 at 10:42 AM Python wrote: > > > Now, you can instantiate a datetime.datetime object with the times you > > > want, and pass an instance of this class as the

Re: datetime seems to be broken WRT timezones (even when you add them)

2020-02-10 Thread Python
On Tue, Feb 11, 2020 at 11:04:28AM +1100, Chris Angelico wrote: > On Tue, Feb 11, 2020 at 10:42 AM Python wrote: > > Now, you can instantiate a datetime.datetime object with the times you > > want, and pass an instance of this class as the tzinfo argument to the > > constructor. Also no problem:

Re: datetime seems to be broken WRT timezones (even when you add them)

2020-02-10 Thread Chris Angelico
On Tue, Feb 11, 2020 at 10:42 AM Python wrote: > > As best I can tell, Python has no means to make use of the system's > timezone info. In order to make datetime "timezone aware", you need > to manually create a subclass of datetime.tzinfo, whose methods return > the correct values for the timezo

Re: datetime seems to be broken WRT timezones (even when you add them)

2020-02-10 Thread Python
On Mon, Feb 10, 2020 at 05:52:59PM -0600, Skip Montanaro wrote: > > As best I can tell, Python has no means to make use of the system's > > timezone info. In order to make datetime "timezone aware", you need > > to manually create a subclass of datetime.tzinfo, whose methods return > > the correct

Re: Software not working

2020-02-10 Thread DL Neil via Python-list
On 11/02/20 12:00 AM, Tushita Parashar wrote: Even after installing the software on my system the software isn’t running. Today, an (apparently) identical question, already asked and answered. Please see the Python-Tutor list: "Python Beginner" msg. -- Regards =dn -- https://mail.python.org/

Re: datetime seems to be broken WRT timezones (even when you add them)

2020-02-10 Thread Skip Montanaro
> As best I can tell, Python has no means to make use of the system's > timezone info. In order to make datetime "timezone aware", you need > to manually create a subclass of datetime.tzinfo, whose methods return > the correct values for the timezone you care about. > ... > Does Python have an a

datetime seems to be broken WRT timezones (even when you add them)

2020-02-10 Thread Python
As best I can tell, Python has no means to make use of the system's timezone info. In order to make datetime "timezone aware", you need to manually create a subclass of datetime.tzinfo, whose methods return the correct values for the timezone you care about. In the general case, this is hard, but

Software not working

2020-02-10 Thread Tushita Parashar
Even after installing the software on my system the software isn’t running. Sent from Windows Mail -- https://mail.python.org/mailman/listinfo/python-list