There is no tag to display the current dateTime value in UTC/GMT. You will need to manually construct a tag with a little in-template python code. A simple approach is to add something like the following (untested) to your template:
#import time #set $utc = $time.strftime(ā%d %B %Y %H:%M:%Sā, $time.gmtime($current.dateTime.raw)) should allow you to use the tag $utc later in your template to display the current dateTime as UTC. The formatting is controlled by the format string in the $time.gmtime() call. The available format codes can be found here <https://docs.python.org/3/library/datetime.html#strftime-and-strptime-format-codes> . There are other more complex approaches depending on your need. Gary On Saturday, 18 September 2021 at 18:18:56 UTC+10 [email protected] wrote: > Hi, > I set my machine to local time, so $current.dateTime gives me 18.09.2021 > 10:13. > Is there a tag to get the UTC time (like $current.dateTime .UTC) ? > I want to display both times as I added some sat pictures which includes > the UTC time on the picture. To get a better overview I want the UTC time > additional in my skin printed out.. > > Thanks in advance, > > Christian > -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/9c165055-d7c8-458a-8e09-22b7625756afn%40googlegroups.com.
