Skip to content

Conversation

@Tobotimus
Copy link

Resolves #1939.

In general, this should make timestamp-parsing mostly platform-independent, since the use of platform-dependent methods such as datetime.fromtimestamp() and datetime.astimezone() are no longer being used. Instead, timestamps are manually offset from the Unix epoch, and are also localised manually.

This PR comes with a new utility function, botocore.utils.parse_posix_timestamp, which is simply a more specific version of botocore.utils.parse_timestamp.

I also made a comment in the relevant tests to note that the tests seem to be written for machines where the timezone is UTC. Tests were failing for me before making any changes, until I ran the tests with the TZ=UTC env var.

@codecov-io
Copy link

codecov-io commented Feb 10, 2020

Codecov Report

Merging #1970 into develop will increase coverage by 0.03%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #1970      +/-   ##
===========================================
+ Coverage    92.73%   92.76%   +0.03%     
===========================================
  Files           53       53              
  Lines        10293    10301       +8     
===========================================
+ Hits          9545     9556      +11     
+ Misses         748      745       -3
Impacted Files Coverage Δ
botocore/utils.py 98.34% <100%> (+0.01%) ⬆️
botocore/credentials.py 98.87% <0%> (+0.33%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 556aaa2...40ed808. Read the comment docs.

@github-actions
Copy link

github-actions bot commented Feb 9, 2021

Greetings! It looks like this issue hasn’t been active in longer than one year. We encourage you to check if this is still an issue in the latest release. Because it has been longer than one year since the last update on this, and in the absence of more information, we will be closing this issue soon. If you find that this is still a problem, please feel free to provide a comment to prevent automatic closure, or if the issue is already closed, please feel free to reopen it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

OSError raised if called with 0.0 and different local timezone (UTC+1)

2 participants