This content has been marked as final. Show 5 replies
Hmmm.... I don't see anything in java.sql.Timestampjava.util.Date and its subclasses in java.sql are TZ-agnostic. They don't hold or need any TZ information.
or java.sql.* that can allow you to set a specific
timezone. How is that handled?
If I create a Date object in California at the same instant that someone in Tokyo creates a Date object, those two Dates will have the same millis-since-epoch long. His will not be 1000 * 60 * 60 * 16 larger than mne.
TZ only comes into play when viewing or parsing dates, and then you use DateFormat.
I don't know if it's standard SQL (and who cares?)Interesting, and slighly icky and frightening.
but I think there are
examples of SQL date/timestamp column types that
include an explicit time zone:
Although I can see where it might occasionally be useful to explicitly specify "local time."