Folks,
I am still occasionally struggling with the tiddlywiki serial date and time stamps.
- I am in the +11 UTC time zone, so when I convert local to UTC it should be an earlier date/time
I think I can simplify the problem as;
How do a convert a local time/date, in tiddlywiki stamp format, to UTC?
- We can convert a UTC time stamp to local time by not including the
[UTC]
part in the date format. - We can generate a UTC time using
- If however I want convert local time to UTC how would we do this?
Some example code.
\define tw-utc-timestamp() [UTC]YYYY0MM0DD-0hh0MM
\define tw-timestamp() YYYY0MM0DD-0hh0MM
* Now in local <<now "YYYY0MM0DD0hh0MM">>
* Now in UTC <<now "[UTC]YYYY0MM0DD0hh0MM">> for me that is yesterday
* Local time as UTC {{{ [[202312151012]format:date<tw-utc-timestamp>] }}} same as local time?
* Local time {{{ [[202312151012]format:date<tw-timestamp>] }}} adds 11 hours?
<<now TZD>>
Gives me;
- I would think now in UTC for me would subtract 11 hours?
- Unfortunately we don’t have the built in date maths to add and subtract the TZD
Am I missing something?, or is tiddlywiki?