[threeten-dev] java.util and java.sql date-time-calendar
Stephen Colebourne
scolebourne at joda.org
Tue Feb 5 00:12:46 PST 2013
I still think TimeZone.toZoneId() should be added. Its going to be a
pretty common conversion.
TimeZone.getTimeZone(ZoneId) has Javadoc that says {@code zoneid}
rather than {@code ZoneId}
If you're insisting on the wrong ISO week definition override, then
you should add "Note: there is no guarantee that toZonedDateTime() and
from(ZonedDateTime) will round-trip." (based on the wording in
Locale.forLanguageTag). ZDT is ISO in terms of year/month/day, but the
week definition is kept separate.
Stephen
On 5 February 2013 05:28, Xueming Shen <xueming.shen at oracle.com> wrote:
> Stephen,
>
> It appears JDBC/SQL exports are fine with the "default zone" and don't want
> UTC
> versoin. So here is the proposed change for the j.util and j.sql date/time
> classes.
> The sql valueOf/toLocalDate/Time pair behave just like the
> valueOf(String)/toString()
> pair now.
>
> http://cr.openjdk.java.net/~sherman/jdk8_threeten/utilsql
>
> It is pointed out that the first sentence in ZDT API is
> " A date-time with a time-zone in the ISO-8601 calendar system..." so the
> iso 8601
> week def setting stays in GC.from(ZDT), with the cost of roundtrip
> conversion.
>
> -Sherman
More information about the threeten-dev
mailing list