Skip to content

Handle conversions for naive datetime values #56

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 13, 2020

Conversation

mkistler
Copy link
Contributor

This PR fixes the datetime_to_string and string_to_datetime handling of dates without timezone information.

Python datetime values come in two forms: "naive" and "aware"

https://docs.python.org/3/library/datetime.html#aware-and-naive-objects

The fundamental difference between these two forms is that "naive" datetimes do not have a timezone, whereas "aware" datetimes do.

This PR fixes the core utility methods for converting datetime to/from strings.

@codecov
Copy link

codecov bot commented Feb 11, 2020

Codecov Report

Merging #56 into master will increase coverage by 0.02%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #56      +/-   ##
==========================================
+ Coverage   97.78%   97.81%   +0.02%     
==========================================
  Files          17       17              
  Lines         588      594       +6     
==========================================
+ Hits          575      581       +6     
  Misses         13       13
Impacted Files Coverage Δ
ibm_cloud_sdk_core/utils.py 99.16% <100%> (+0.04%) ⬆️

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 f67a1d9...f1149fa. Read the comment docs.

Copy link
Member

@padamstx padamstx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@mkistler mkistler merged commit d51781d into master Feb 13, 2020
@ibm-devx-automation
Copy link

🎉 This PR is included in version 1.6.2 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@padamstx padamstx deleted the mdk/more-datetime-conversion-fixes branch November 10, 2020 15:13
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.

3 participants