Skip to content

Commit

Permalink
Fix conversion of config timestamp to datetime
Browse files Browse the repository at this point in the history
It was using `fromtimestamp` which 'returns the local date and time'.
The `utcfromtimestamp` returns a UTC datetime.
This probably explains the reason for the inconsistency seen in #110.
  • Loading branch information
Arne de Laat committed Nov 27, 2015
1 parent ad4be53 commit 2fd6331
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion django_publicdb/histograms/jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,7 @@ def update_config(summary):
elif var in ['mas_version', 'slv_version']:
vars(new_config)[var] = blobs[config[var]]
elif var == 'timestamp':
ts = datetime.datetime.fromtimestamp(config[var])
ts = datetime.datetime.utcfromtimestamp(config[var])
vars(new_config)[var] = ts
else:
vars(new_config)[var] = config[var]
Expand Down

0 comments on commit 2fd6331

Please sign in to comment.