[Git][NTPsec/ntpsec][master] ntpclients/ntpviz.py: Whoops no datetime.UTC befor 3.11.

Gary E. Miller (@garyedmundsmiller) gitlab at mg.gitlab.com
Tue Dec 17 20:34:19 UTC 2024



Gary E. Miller pushed to branch master at NTPsec / ntpsec


Commits:
59717f6f by Gary E. Miller at 2024-12-17T12:33:20-08:00
ntpclients/ntpviz.py: Whoops no datetime.UTC befor 3.11.

Use datetime.timezone.utc instead.

- - - - -


1 changed file:

- ntpclients/ntpviz.py


Changes:

=====================================
ntpclients/ntpviz.py
=====================================
@@ -1812,9 +1812,9 @@ tbody tr:nth-child(6n+6) {
     # Ugh.  Not clear what to do in the multiplot case
     if len(statlist) == 1:
         start_time = datetime.datetime.fromtimestamp(
-            stats.starttime, datetime.UTC).strftime('%c')
+            stats.starttime, datetime.timezone.utc).strftime('%c')
         end_time = datetime.datetime.fromtimestamp(
-            stats.endtime, datetime.UTC).strftime('%c')
+            stats.endtime, datetime.timezone.utc).strftime('%c')
 
         index_header += '<b>Start Time:</b> %s UTC<br>\n' \
                         '<b>End Time:</b> %s UTC<br>\n' \



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/-/commit/59717f6fc40e191327ccdb61af037b6b38ecb7c5

-- 
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/-/commit/59717f6fc40e191327ccdb61af037b6b38ecb7c5
You're receiving this email because of your account on gitlab.com.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20241217/4d033a96/attachment.htm>


More information about the vc mailing list