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

Stamped times, are they TZ aware? #105

Open
KaraMelih opened this issue Aug 13, 2024 · 3 comments
Open

Stamped times, are they TZ aware? #105

KaraMelih opened this issue Aug 13, 2024 · 3 comments

Comments

@KaraMelih
Copy link
Collaborator

Thanks to @sybenzvi while working on #98 we noticed that tz aware and tz naive times would cause troubles when tracking the heartbeats from the last 24hr.

I'm opening this issue so we can confirm that every timestamp we use considers UTC times (e.g. tz naive)

@KaraMelih
Copy link
Collaborator Author

@sybenzvi
Copy link
Contributor

Two questions:

  1. Is this issue entangled with the creation of timestamps in snews_pt?
  2. Is there a PR on this project that we want to create?

@KaraMelih
Copy link
Collaborator Author

The times that we (the software) stamp are always UTC;

Here is the "Received Time"

snews_message['received_time'] = np.datetime_as_string(np.datetime64(datetime.utcnow().isoformat()), unit='ns')

Here is the "Sent Time"
https://github.com/SNEWS2/SNEWS_Publishing_Tools/blob/62a62526aa3a3dd1147dad721893af53df520e8a/snews_pt/messages.py#L74

The neutrino time that the user passes are asked to be ISO-Format strings. My understanding is that iso-format also uses UTC, and since they pass strings, we have no way of checking the tz properties.

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

2 participants