We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
SSDAQ/ssdaq/receivers/readout_assembler.py
Line 31 in 7c70571
Line 255 in 7c70571
Using datetime.datetime.utcnow().timestamp() results in an incorrect unix time if your timezone is not UTC.
datetime.datetime.utcnow().timestamp()
See https://docs.python.org/3/library/datetime.html#datetime.datetime.utcnow and https://bugs.python.org/issue33293.
Correct approach to get seconds from epoch (UTC/unix) using the datetime package is datetime.datetime.now(datetime.timezone.utc).timestamp().
datetime.datetime.now(datetime.timezone.utc).timestamp()
Existing SS data therefore contain a timestamp that if you assume is unix time, is two hours earlier than the true unix time.
The text was updated successfully, but these errors were encountered:
Analysis up to this point has correctly accounted for this. But this has the potential to be very confusing in the future.
Sorry, something went wrong.
No branches or pull requests
SSDAQ/ssdaq/receivers/readout_assembler.py
Line 31 in 7c70571
SSDAQ/ssdaq/receivers/readout_assembler.py
Line 255 in 7c70571
Using
datetime.datetime.utcnow().timestamp()
results in an incorrect unix time if your timezone is not UTC.See https://docs.python.org/3/library/datetime.html#datetime.datetime.utcnow and https://bugs.python.org/issue33293.
Correct approach to get seconds from epoch (UTC/unix) using the datetime package is
datetime.datetime.now(datetime.timezone.utc).timestamp()
.Existing SS data therefore contain a timestamp that if you assume is unix time, is two hours earlier than the true unix time.
The text was updated successfully, but these errors were encountered: