Re: GregorianCalendar not equal when read from space

Jean Cote <[email protected]> Fri, 4 May 2007 08:55:48 -0700
Newsgroups gmane.comp.java.sun.javaspaces
Message-ID <[email protected]>
Hi,

The solution was to use
SimpleTimeZone.getTimeZone("GMT")
instead of
new SimpleTimeZone(0, "GMT")

Your answer quickly lead me to the correct way of
initializing the SimpleTimeZone for GMT.
Thanks

--- Bob Scheifler <[email protected]> wrote:

> > If I write a GregorianCalendar without the
> > SimpleTimeZone, it is equal. If I write only a
> > SimpleTimeZone it is also equal.
>
> I don't know why, but Calendar has a readObject
> method that
> intentionally converts a SimpleTimeZone to a
> ZoneInfo with
> equivalent info.  So you may have better luck using
> a
> ZoneInfo instead of a SimpleTimeZone.
>
> - Bob
>


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

===========================================================================
To unsubscribe, send email to [email protected] and include in the body
of the message "signoff JAVASPACES-USERS".  For general help, send email to
[email protected] and include in the body of the message "help".

To view past JAVASPACES-USERS postings, please see:
http://archives.java.sun.com/archives/javaspaces-users.html