Salut Claude,

Am 2016-11-29 um 17:22 schrieb Claude Brisson:
The DateTool should now be fixed:

- the stupid bug about date formats ignoring time zone has been fixed

- the new standard formats are iso / iso_tz for ISO 8601, and intl /
intl_tz for the human-readable versions which use time zone IDs for
formatting.

See commit http://svn.apache.org/viewvc?view=revision&revision=1771916

All of this would have been simpler to code using java8 java.time or
joda-time libs, but each version has enough reenginering trouble of its
own. Plus, SimpleDateFormat not being thread-safe, a new format is
instantiated for each parsing or rendering. All of this leaves a bit of
an aftertaste of sub-optimality,

I totally agree with the fact that datetimes should be formatted into
users timezone as often as possible. But we still have to rely on the
webapp author to convey users timezones...

just checked the commit. The new code looks really great now, clean and consistent. However, the comments have a few typos: ISO-8601, ISO 88601. Replace it with "ISO 8601" and you are done.

Thanks for making Velocity even better...

Merci,

Michael

On 26/11/2016 02:08, Michael Osipov wrote:
Am 2016-11-25 um 01:08 schrieb Claude Brisson:

By Olson TZ ID, I guess you refer to "zzz" (aka CET), and not "zzzz"
(aka Central European Time), don't you?

No, never ever use this braindead RFC three-letter timezones. They are
not standardized, not unambigious. Invented in the dark ages of the
Internet.

See here: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
They are fully supported by java.util.TimeZone.

Unfortunately, SimpleDateFormat does not support them as format option.
I highly recommend to drop those bits in r1771188.


Ok, which means I have to replace zzz by TimeZone.getId(), correct?

Yes.






---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@velocity.apache.org
For additional commands, e-mail: dev-h...@velocity.apache.org

Reply via email to