Is the format:date[0MM0DD] supposed to yield the day before?

I went to tiddlywiki.com, opened up a tiddler and wrote:

\function test() [[20200523]format:date[0MM0DD]]

Was expecting 0523 and got: <<test>>

I get

0522

I am new to TW and am sorry if this is the wrong place or a trivial issue to bring up. Any help would be great!

1 Like

Hi @arnimir and welcome!

Quick answer before going to bed: the problem probably comes from your timezone (looks like you are at GMT+8). The input of the format:date operator is supposed to be in the UTC/GMT time zone, and your format string is expressed as a local time. Try prefixing it with “[UTC]”, but you’ll probably need a variable because square brackets are not allowed in filter operator literal operands.

Have fun!

Fred

1 Like

Hey, thanks, that worked great! Didn’t think of the timezone. Cheers!