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

Make all extracted start and end datetime stamps time zone aware. #16

Open
DinoBektesevic opened this issue Jun 24, 2021 · 0 comments
Open

Comments

@DinoBektesevic
Copy link
Member

Standardizers extract start and end datetime stamps from headers of uploaded FITS files. The best I can read out from the FITS standard used by Astropy there is no particular set reference time zone in which the dates are expressed in:

As specified by Bunclark & Rots (1997), time zones are explicitly not supported in FITS and, consequently, appending the letter ‘Z’ to a FITS ISO-8601 string is not allowed. The rationale for this rule is that its role in the ISO standard is that of a time zone indicator, not a time scale indicator. As the concept of a time zone is not supported in FITS, the use of time zone indicator is inappropriate

when they are expressed as a datetime stamp for which this information is ambiguous. Really I don't know why we would need to solve this problem instead of just inserting the raw data as-is into our DB but unfortunately, Django ORM datetime stamp is sensitive to differences between naive and non-naive timestamps.

Setting USE_TZ=False in settings.py uses naive timestamps, no timezone information, and vice-versa. FITS files we're testing with come with both naive and non-naive timestamps. It's a matter of choice whether we want to go through the extra effort to ensure all timestamps are timezone aware or not. This change affects Standardizer metadata processing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant