//var -s %day 31 | echo -a $ctime(Oct %day 2021 00:00) vs $ctime(Dec %day 2021 00:00)

* Set %day to 31
1635656400 vs

Yes, it's related to the issue reported here:
https://forums.mirc.com/ubbthreads.php/topics/266592/timer-and-variable-assignment

So basically, the unexpected behavior happens for strings passed to an identifier which happen to begin with a word which matches some of the commands which don't evaluate %word in some situations, such as when the 1st parm is either INC or DEC or SET or UNSET or SOCKREAD, But not VAR. And the link shows it's also happening when a timer commandline is evaluated, and in that case even when the "inc %word" isn't at the beginning of the string.

The evaluation routine doesn't know whether it's handling a string that's actually a command or if it's handling a string that's just a string being passed to an identifier like $Identifier(string)?

//var %a 123 | echo -ag $upper(set -s %a 2 + 2)
//var %a 123 | echo -ag $upper(var -s %a 2 + 2)
//var %a 123 | echo -ag foo $upper(sockread 1234 %a ) bar
//var %a 123 | echo -ag foo $eval(inc -s %a bar,$rand(99,999) )
//var %a 123 | echo -ag $upper(%a = 1 )

returns:
SET -S %A 2 + 2
VAR -S 123 2 + 2
foo SOCKREAD 1234 %A bar
foo inc -s %a bar
SET %A 1