On Friday, January 12, 2018 at 1:06:11 AM UTC-7, passingby wrote: > > I just noticed something strange while playing around with datepicker from > here http://kixam.github.io/TW5-datePicker/ > > If i write <$edit-date> into a new tiddler and then let the view render, > and pick a date, it picks up the date and then right before my eyes skips > back by one day! So if i pick 12th of jan it becomes 11th of january. Can > anybody confirm this to be happening or I am in need of sleep? >
I think I have found out the problem, and it has nothing to do with the date picker plugin. It has something to do with the fact that TW stores dates in UTC but when rendering, the dates are rendered as the browser specific timezone. The problem now becomes, how to prevent this. How to make the tiddler display the date as it is stored in the field rather than shifting it to the local timezone? Tiddlywiki.com says attach [UTC] in the very front of the format string should keep the date to UTC. [UTC] Time-shift the represented date to UTC. Must be at very start of format string But this is doing nothing for me: if i have a field asdf with the value as 20180112000000000 and get it to display with this: <$view field="asdf" format="date" template="[UTC]DD MMM YYYY"/> the date skips by one day and displays as: [UTC]11 January 2018 -- You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/tiddlywiki. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/01b5f70c-4392-43a2-b7f3-8b14398650e7%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.

