Skip to content
This repository has been archived by the owner on Jul 7, 2022. It is now read-only.

Commit

Permalink
Merge pull request #49 from AusDTO/bugfix/user-dates
Browse files Browse the repository at this point in the history
Bugfix/user dates
  • Loading branch information
djrobstep authored Oct 16, 2016
2 parents 9969151 + e91afb9 commit d216c69
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions dmutils/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ def from_json(user_json):
user = user_json["users"]
supplier_code = None
supplier_name = None
terms_accepted_at = pendulum.parse(user['termsAcceptedAt'])
terms_accepted_at = terms_accepted_at.replace(tzinfo=pytz.timezone('UTC'))
terms_accepted_at = pendulum.parse(user['termsAcceptedAt']).in_tz('UTC')

if "supplier" in user:
supplier_code = user["supplier"]["supplierCode"]
supplier_name = user["supplier"]["name"]
Expand Down
2 changes: 1 addition & 1 deletion tests/test_user.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def user_json():
"supplierCode": 321,
"name": "test supplier",
},
"termsAcceptedAt": "2016-01-01T01:00:00.0Z",
"termsAcceptedAt": "2016-01-01T01:00:00.0+00:00",
}
}

Expand Down

0 comments on commit d216c69

Please sign in to comment.