This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author jerrykramskoy
Recipients jerrykramskoy
Date 2017-09-01.17:24:09
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1504286649.82.0.482783873664.issue31327@psf.upfronthosting.co.za>
In-reply-to
Content
Running python 3.6.2 on Windows 10.

The following method causes presents a timetstamp value of -3600 (i.e. DST adjustment of one hour) which causes time.localtime() to raise an OS Errno 22.


    def _naive_is_dst(self, dt):
        timestamp = _datetime_to_timestamp(dt)
        return time.localtime(timestamp + time.timezone).tm_isdst



Reproduce with python shell...

import time
z=time.localtime(-3600)
Traceback (most recent call last):
  Python Shell, prompt 7, line 1
builtins.OSError: [Errno 22] Invalid argument



The documentation doesn't specify a legal value range for input to localtime.


Unfortunately,this causes AWS boto3 support for dynamodb to crash.

Cheers, Jerry
History
Date User Action Args
2017-09-01 17:24:09jerrykramskoysetrecipients: + jerrykramskoy
2017-09-01 17:24:09jerrykramskoysetmessageid: <1504286649.82.0.482783873664.issue31327@psf.upfronthosting.co.za>
2017-09-01 17:24:09jerrykramskoylinkissue31327 messages
2017-09-01 17:24:09jerrykramskoycreate