I hadn't... But it doesn't work. It doesn't recognise it as a variable and
prints the literal text instead.
I also spotted "localize=True" mentioned in the documentation, but that
doesn't work either... It gives "Reason: format() got an unexpected keyword
argument 'localize'". I guess that's only for names of units and such.
It looks like I can use the "TZ" environment variable, a cron job and a
separate config file to make the magic happen though... I'll test later,
and see.
TB
On Sunday, 10 March 2019 16:26:54 UTC+11, Andrew Milner wrote:
>
> Since the database stores timestamps in UTC anyway have you tried adding
> .raw eg: $current.dateTime.raw.format("%d-%b-%Y %H:%M")
>
>
>
>
> On Sunday, 10 March 2019 05:32:49 UTC+2, 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.