On Thu, 2006-02-16 at 18:05 -0500, J. B. Rainsberger wrote:
> Stephen Colebourne wrote:
> 
> > 2) The toXxx() methods on Instant.
> > Instant does have a time zone (as pointed out below) but this is really 
> > an artifact of implementing the interface. In practice, Instant should 
> > be thought of as having no time zone.
> 
> I find this curious. If an Instant should have no time zone, then how do 
> you describe the instant 10/29/2006 1:34:32.192 EDT? Is it just 
> 10/29/2006 02:34:32.192, meaning sometime during the 3rd hour of the day?

But since instance is "An Instant is defined as an instant in the
datetime continuum specified as a number of milliseconds from
1970-01-01T00:00Z. This definition of milliseconds is consistent with
that of the JDK in Date or Calendar."
-- http://joda-time.sourceforge.net/key_instant.html

java.util.Date, thus at that level no timezone would be required, but
since the AbstractInstant interface says it can deliver all the
calendarical fields of an Instant in time and even has a GetTimeZone()
method.  It seems to me that the ability of AbstractIntance to work with
all of the calendar parts requires, not by the internals of the
implementation, but by the contract of the interface that all its
subclasses have some notion of Timezone, having a Timezone thus
requires the incorporation of the offset.

A complete specification of time requires the ability to
differentiate between

1:30 Daylight Savings Time
1:30 Not Daylight Savings Time (typically thought of as standard local
time)

Not unlike the java.util API the offset value is obtainable through 

myDateTime.getTimeZone().getOffset(myDateTime);

Which might suggest an API enhancement for a simplier way tell if
something is in a DLS period or not, but doesn't seem to eliminate the
external requirement of an instance to know it's own DLS rule in 
order to state various Hour values correctly.

-Paul







-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Joda-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/joda-interest

Reply via email to