mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Convert to UTC instead of stripping timezone
Co-authored-by: Nicola Soranzo <nicola.soranzo@gmail.com>
This commit is contained in:
co-authored by
Nicola Soranzo
parent
414156af8a
commit
cd76fef415
@@ -18,5 +18,4 @@ class OffsetNaiveDatetime(datetime):
|
||||
@classmethod
|
||||
def validate(cls, v):
|
||||
v = parse_datetime(v)
|
||||
v = v.replace(tzinfo=None)
|
||||
return v
|
||||
return v.replace(tzinfo=None) - v.utcoffset() if v.tzinfo else v
|
||||
|
||||
Reference in New Issue
Block a user