Adjust sameday filter results for time zone

149 views
Skip to first unread message

cmari

unread,
Nov 15, 2014, 1:58:46 PM11/15/14
to tiddl...@googlegroups.com
For a long time I've been mystified by the fact that I could never get correct results when I experimented with what's described in
http://tiddlywiki.com/#FilterOperator%3A%20sameday
where it says
[sameday[20140410]] Returns a list of the tiddlers modified on the 10th April 2014.

I am 8 hours behind UTC, and I assumed that had something to do with things.  But sameday doesn't seem to look for the UTC date that I can see in the modification field.
If I try sameday with today's date (November 15th, or 20141115), for example, I get only tiddlers that were modified on the 14th (with a modified field of, e.g., 20141114160205254).
On the other hand, if I give tomorrow's date (20141116), I do see today's tiddlers (even though they have a modification date of, e.g., 20141115152548000).

After lots of trial and error, I discovered that I can get the correct results (I think!) if I append a number to the date that is equal to or larger than the number of hours by which my time zone is behind UTC.
To get tiddlers I modified today (the 15th of November), I can use
[sameday[201411158]]
(this works even for tiddlers modified at night, when the date in the modification field date has already changed to the next day).

Because I don't understand this, I am unfortunately not able to offer any assistance with updating documentation, but I do think it's confusing and I'm hoping that someone else might be able to insert some clarification into the sameday documentation.

Thanks,
cmari

Jeremy Ruston

unread,
Nov 18, 2014, 8:40:08 AM11/18/14
to TiddlyWiki
Hi cmari

The explanation is in this ticket:


The problem is that although dates and times are stored in UTC they are displayed in the users local timezone. The sameday operator also works on the local timezone.

Your workaround is sound but this should be fixed. I've created a new ticket here:


Best wishes

Jeremy


--
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 tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/d/optout.



--
Jeremy Ruston
mailto:jeremy...@gmail.com
Reply all
Reply to author
Forward
0 new messages