This is the mail archive of the
java-discuss@sourceware.cygnus.com
mailing list for the Java project.
Re: Date/Calendar related fixes (?)
- To: Mike Leddy <mike@ultranet.com.br>
- Subject: Re: Date/Calendar related fixes (?)
- From: Per Bothner <bothner@cygnus.com>
- Date: Wed, 12 May 1999 14:55:29 -0700
- cc: gcj-discuss <java-discuss@sourceware.cygnus.com>
> time = t * 1000LL + elements(fields)[MILLISECOND];
I suggest instead:
> time = t * (jlong) 1000 + elements(fields)[MILLISECOND];
> Second in Calendar.java, setTimeInMillis, line 249
>> computeFields();
>
> I replaced clear() with computeFields(). My app extensively uses
> Date.setMinute() etc.
I think it would be better to fix set in Calendar.java:
public final void set (int fld, int value)
{
if (! areFieldsSet) computeFields();
fields[fld] = value;
isTimeSet = false;
}
Could you try these?
--Per Bothner
bothner@cygnus.com http://www.cygnus.com/~bothner