FIX/Keep time zone info written in METADATA/creationDate
Description
This issue was discovered while investigating updating detector mapping for AGIPD@SPB.
After taking data for AGIPD@SPB and trying to test new modified mapping it was using 1 hour older creation_time.
How Has This Been Tested?
-
This was tested with
AGIPD_Retrieve_Constants_Precorrection.ipynb
notebook to check that we have the same output format with extra zone info. -
And was tested with max-exfl017 as it has new mapping changes at 2021-03-01 09:44:00 UTC or 2021-03-01 10:44:00 CET
>> import datetime
>> c = datetime.datetime.strptime("2021301T094400Z", "%Y%m%dT%H%M%SZ")
2021-03-01 09:44:00
After preserving the timezone.
>> import datetime
>> c = datetime.datetime.strptime("2021301T094400Z", "%Y%m%dT%H%M%SZ").replace(tzinfo=datetime.timezone.utc)
2021-03-01 09:44:00+00:00
Relevant Documents (optional)
Types of changes
- Bug fix (non-breaking change which fixes an issue)
Checklist:
- My code follows the code style of this project.
Reviewers
Edited by Karim Ahmed