It would be useful to have an option for using UTC on tiddlers'
timestamps (created/modified):
http://trac.tiddlywiki.org/ticket/651
There's a [tw] thread explaining one use case for this:
http://groups.google.com/group/TiddlyWiki/t/b29de42520acee8c
I have tried the following:
http://tiddlywiki.pastebin.com/f1c0a2b7b
However, that breaks the respective tiddler's created and modified
properties - but I can't figure out why (debugging correctly shows date
objects for both cases in Tiddler.prototype.assign()... ).
Any help would be appreciated!
-- F.
That's just the diff - the full functions might be more helpful:
http://tiddlywiki.pastebin.com/f72bd5d82
-- F.
> The problem is that modified.toUTC() doesn't actually return anything,
> so this.modified = modified.toUTC() sets this.modified to undefined.
Oh my - I had noticed the missing return as well, but had only tried a
return on the same line:
return this.setMinutes(this.getMinutes() + this.getTimezoneOffset());
Oddly enough, this seemed to produce the correct results during
debugging (thus my confusion) - so I probably wasn't being careful
enough there...
The toUTC() function was inspired by Helma (via Google Code search):
http://google.com/codesearch?q=Helma+toUTC+lang%3Ajavascript
Helma uses a BSD-style license:
http://dev.helma.org/license/
Is this function small/simple/unoriginal enough so I don't have to
include Helma's copyright notice in our adaptation?
-- F.