View Single Post
Old 10-04-2021, 05:02 AM   #172
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,463
Karma: 8025600
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by capink View Post
Edit: I tried the format_date() but for some reason it is not working:

Code:
template:"program:
	format_date($$timestamp, 'hh:mm')#@#:t:00:00"
Timestamps are stored in UTC. The format_date() function converts them to local time (in the current time zone), including summer time adjustments if any. Your template ignores the time zone so times are not adjusted.

It seems to me that the format_date() answer is the right one because time zones should be accounted for. However, if you don't want that then this template removes time zone from the ISO string turning it into a local time.
Code:
	format_date(re($$timestamp, '(\+.*$)', ''), 'hh:mm')
chaley is offline   Reply With Quote