There is a strange problem today. Colleague to visit my Computer published Program page, freemarker date format error. Other computer access is not a problem.
Post the error message first.
FreeMarker template error
The string doesn‘t match the expected date/time/date-time format. The string to parse was: "2015-08-27 11:50:35.013". The expected format was: "MMM d, yyyy h:mm:ss a".
The nested reason given follows:
Unparseable date: "2015-08-27 11:50:35.013"
----
FTL stack trace ("~" means nesting-related):
- Failed at: ${model.jzUser.scdlsj?datetime} [in template "right.htm" at line 80, column 49]
----
Java stack trace (for programmers):
----
freemarker.core._TemplateModelException: [... Exception message was already printed; see it above ...]
That is, the default date format is turned into a colleague's computer: "MMM D, yyyy h:mm:ss a"
On the official website to see some information, which refers to the default date format problem.
Http://freemarker.org/docs/ref_builtins_string.html#ref_builtin_string_date
So I did a setting problem on the head of the page and solved it.
< #setting datetime_format= "Yyyy-mm-dd HH:mm:ss"/>
But the question is, clearly is the server-side code (freemarker), why it is related to the client's environment.
Error in date time format in Freemarker