Hi,
WeeWX does not support timezones though it is possible to do what you want
by making use of some of the 'GMT' functions in the python datetime module
and a bit of inline python code. If you insert something like:
#import datetime
#set $gmt_dt = datetime.datetime.utcfromtimestamp($current.dateTime.raw)
#set $gmt_string = $gmt_dt.strftime("%d %B %Y %H:%M:%S")
in your template you can then use the tag $gmt_string anywhere in your
template (from that point on) to display the GMT time in human readable
format. The format is set by the format string that is an argument to the
strftime method. The available format string codes are listed here
<https://docs.python.org/2/library/datetime.html#strftime-strptime-behavior>
.
Gary
On Sunday, 10 March 2019 13:32:49 UTC+10, Tim Bates wrote:
>
> I have 2 templates running - one pretty HTML one for our use, and another
> that will FTP text data to a remote site. The remote site needs the
> timestamps in UTC with a specific format. Everything is working right,
> except the time stamps are our local time.
> Is there a way to get a formatted version of the date and time stamps, but
> with the timezone set to UTC?
>
--
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].
For more options, visit https://groups.google.com/d/optout.