A way to view the current utc date-time?

53 views
Skip to first unread message

Donald Coates

unread,
Mar 13, 2020, 11:30:49 PM3/13/20
to tiddl...@googlegroups.com
Is there a way to view the current date-time.  Ie <$view field="created"> except instead of 'created' show the current date time in utc?

My use case is that I want to use the nodejs --setfield command to set the created/modified field to the utc date-time that the command is being run.  I know in the tiddlywiki.files file you can set "created": {"source": "created"} but I really want to be able to do so through the nodejs --setfield option.

For review the --setfield option requires the field name then the value is set using the contents of a tiddler.  Hence I need that tiddler to produce the current time that the file is being processed.

My work around is to have <$view field="modified"/> in a tiddler, edit then save it and copy paste the result into another tiddler used for processing  but I'm hoping there is a more automated solution.

Thank you!

Eric Shulman

unread,
Mar 14, 2020, 12:57:22 AM3/14/20
to TiddlyWiki
On Friday, March 13, 2020 at 8:30:49 PM UTC-7, Donald Coates wrote:
Is there a way to view the current date-time.  Ie <$view field="created"> except instead of 'created' show the current date time in utc?


Specifically, the following documentation:

The format string [UTC]YYYY0MM0DD0hh0mm0ssXXX will return a date string representing the UTC time-stamp as it is used in the TiddlyWiki created and modified time-stamp fields. 

hope this helps,
-e
Eric Shulman
TiddlyTools.com: "Small Tools for Big Ideas!" (tm)
InsideTiddlyWiki - http://TiddlyTools.com/InsideTW 

Donald Coates

unread,
Mar 14, 2020, 11:57:11 AM3/14/20
to TiddlyWiki
That is 100% the solution.  I can now get some sleep!   Seriously thank you so much.  Have a great weekend.

Donald Coates

unread,
Mar 14, 2020, 12:10:02 PM3/14/20
to TiddlyWiki
Off topic - I have been using TW on and off since the days of classic and spent a lot of time playing around on the tiddly tools page.  I am a big fan!  You really opened me up to the idea of TW as way more than just a wiki/place to throw random thoughts.  Not anything specific just the idea that here is this piece of software that can do so much let's play and see what it can be.  I didn't realize you had a new site with TW5 up - it's beautiful and I look forward to spending time there.
Reply all
Reply to author
Forward
0 new messages