I think it's a bug.

What it's doing is taking the string you gave it and appending zeros to 
make it represent that date as a UTC date at the very start. Then it 
converts that date into the local date and truncates the hours. 

Then it compares that date against the field date (stored as UTC) converted 
to a local date truncated by hours.

The error is at the very start. By turning your string into the UTC date at 
the very start of the day BEFORE converting it into a local date, it has 
effectively moved the comparison date  BACK 7 hours. In this case, that 
means the actual date is 7/19 local time.  The UTC field date is still on 
7/20.

The reason this error hasn't been noticed is because it works fine when the 
conversion compares against a date field (the majority of use cases) and 
rarely gives an error for anyone operating near GMT-0.

I think the code needs to be altered to assume that the target date is a 
local date (not UTC date) WHEN a short (non-field) date is used.

-- Mark


On Friday, July 20, 2018 at 11:51:50 AM UTC-7, Jim Farrand wrote:
>
>
> I have recently created a tiddler, which has created timestamp: 
> 20180720180051119.  I would naively assume that the filter:
>
> [sameday:created[20180720]]
>
> would return this tiddler, but it doesn't.  It is, however, returned by 
> this filter:
>
> [sameday:created[20180721]]
>
> Is this just how sameday works, or do I have some sort of setup problem?  
> If sameday works this way, I would have thought this might be mentioned in 
> the documentation for that operator, so I suspect I have some issue 
> specific to me.  I'm currently in timezone PDT, whereas my "normal" 
> timezone is BST, so I'm wondering if I have some confused configuration 
> somewhere which is screwing things up.
>
> (I'm trying to create a journal template that includes the list of 
> tiddlers created/modified on that day.)
>
> Thanks in advance,
> Jim
>

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
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/0d797b4b-33ec-4acb-a9a3-7a7c17e50083%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to