In one of our NaviServer/OpenACS instances we often run into the following error. After a restart, the error is gone, but will reappear (under circumstances that I have not understood yet). It seems to me as if some code would mess up the message catalog or the locale used/seen by the clock.tcl implementation. However, I am unsure how to debug this best.
expected integer but got "GREGORIAN_CHANGE_DATE"
while executing
"GetDateFields $clockval $TZData($timezone) GREGORIAN_CHANGE_DATE"
(procedure "::tcl::clock::formatproc'%Y-%m-%dT%H\:%M\:%SZ'c" line 4)
invoked from within
"$procName $clockval $timezone"
(procedure "::tcl::clock::format" line 34)
invoked from within
"clock format [clock seconds] -timezone :UTC -format %Y-%m-%dT%H:%M:%SZ"
Any ideas are highly appreciated!
::msgcat::mclocale
? – Brad Lanam Feb 28 '18 at 15:18clock format
is very complex (doing code generation at runtime) but the generated code is mostly simple. Alas, in this case you're in a locale that appears to be missing theGREGORIAN_CHANGE_DATE
information. What is your locale? – Donal Fellows Mar 1 '18 at 8:38set date [GetDateFields $clockval $TZData($timezone) @GREGORIAN_CHANGE_DATE@]
that throws the error. The log statement outputs[msgcat::mclocale]
, which wasen_us
. Hmmm – Mischa Mar 13 '18 at 14:50