Displaying dateTime in another Time Zone

27 views
Skip to first unread message

Karen K

unread,
Feb 16, 2021, 4:39:34 PM2/16/21
to weewx-user
Is there a possibility to format the dateTime value that is shows the time in another time zone, for example UTC or local mean time (LMT)?

Example (for Central European Time and longitude=13.040°):

$current.dateTime.raw ==> 1622502001

$current.dateTime.format(...) ==> 01.06.2021 01:00:01 CEST 

?? ==> 31.05.2021 23:00:01 UTC   

?? ==> 31.05.2021 23:52:11 LMT


Tom Keffer

unread,
Feb 16, 2021, 4:58:17 PM2/16/21
to weewx-user
There is not. The reason is that it would require either Python V3.9, and/or another pre-requisite, tzdata.

Still, it might be possible to make it optional, similar to how pyephem is dealt with. That would allow something like


This is something I've thought of frequently, but you're the first person who has actually asked about it!

-tk

--
You received this message because you are subscribed to the Google Groups "weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/165ff6e6-19a4-4d86-90f5-85bd83a32f8en%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages