Skip to content
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

Create timezone-aware datetimes when parsed as such #163

Merged
merged 8 commits into from Dec 15, 2019
Merged

Create timezone-aware datetimes when parsed as such #163

merged 8 commits into from Dec 15, 2019

Commits on Dec 10, 2019

  1. On load, now use aware datetimes if possible

    On loading data, if timestamps have an ISO "+HH:MM" UTC offset then the resultant datetime is converted to UTC.  This change adds that timezone information to the datetime objects.
    
    Importantly, this addresses a Django warning (and potential error) that appears when using both YAML fixtures in a timezone-aware project.  It was raised as a Django issue (https://code.djangoproject.com/ticket/18867), but subsequently closed because the Django devs felt that this is a PyYAML problem.
    cdavoren authored and akaIDIOT committed Dec 10, 2019
    Copy the full SHA
    20d8442 View commit details
    Browse the repository at this point in the history
  2. Copy the full SHA
    f7e81e6 View commit details
    Browse the repository at this point in the history
  3. Copy the full SHA
    413a4df View commit details
    Browse the repository at this point in the history
  4. Copy the full SHA
    c78a22d View commit details
    Browse the repository at this point in the history
  5. Copy the full SHA
    09705f8 View commit details
    Browse the repository at this point in the history
  6. Copy the full SHA
    31c176f View commit details
    Browse the repository at this point in the history
  7. Fix code structure for Python 3

    Call datetime.datetime constructor once at return.
    akaIDIOT committed Dec 10, 2019
    Copy the full SHA
    f2f4617 View commit details
    Browse the repository at this point in the history
  8. Fix code structure for Python 2

    Call datetime.datetime constructor once at return.
    akaIDIOT committed Dec 10, 2019
    Copy the full SHA
    5218216 View commit details
    Browse the repository at this point in the history