java version "1.3"
Classic VM (build JDK-1.3-I, green threads, sunwjit)
SunOS tuna 5.7 Generic sun4u sparc SUNW,Ultra-5_10
locale : zh
DateFormat.format produce OBNg4:48 16:48:44, which is not correct.
to reprocude, compile and run the attached program
Name: skT88420 Date: 09/13/99
DateFormat timeFormatter = DateFormat.getTimeInstance();
timeFormatter.format(ydate);
Produces erroneous result. The formatted time is duplicated in the result returned i.e. 12:00 AM 12:00:01 AM. The above lines of codes works well in JDK1.2.2 but is generating null pointer exception in JDK1.3ea.
(Review ID: 95200)
======================================================================
Name: skT88420 Date: 09/17/99
The following small program:
import java.lang.*;
import java.util.*;
import java.text.*;
public class DateBug {
public static void main(String[] args) {
DateFormat tf = DateFormat.getTimeInstance(DateFormat.SHORT);
System.out.println(tf.format(new Date()));
}
}
Has an output on 1.3beta-0
2:30 PM 2:30 PM
Has an output on 1.2.2 or 1.1.7
2:30 PM
It seems to me that there is a little bug in the run time libs.
This bug is not affected by the JIT settings HotSpot, Classic,
and Interpreter show the same result
(Review ID: 95406)
======================================================================
Classic VM (build JDK-1.3-I, green threads, sunwjit)
SunOS tuna 5.7 Generic sun4u sparc SUNW,Ultra-5_10
locale : zh
DateFormat.format produce OBNg4:48 16:48:44, which is not correct.
to reprocude, compile and run the attached program
Name: skT88420 Date: 09/13/99
DateFormat timeFormatter = DateFormat.getTimeInstance();
timeFormatter.format(ydate);
Produces erroneous result. The formatted time is duplicated in the result returned i.e. 12:00 AM 12:00:01 AM. The above lines of codes works well in JDK1.2.2 but is generating null pointer exception in JDK1.3ea.
(Review ID: 95200)
======================================================================
Name: skT88420 Date: 09/17/99
The following small program:
import java.lang.*;
import java.util.*;
import java.text.*;
public class DateBug {
public static void main(String[] args) {
DateFormat tf = DateFormat.getTimeInstance(DateFormat.SHORT);
System.out.println(tf.format(new Date()));
}
}
Has an output on 1.3beta-0
2:30 PM 2:30 PM
Has an output on 1.2.2 or 1.1.7
2:30 PM
It seems to me that there is a little bug in the run time libs.
This bug is not affected by the JIT settings HotSpot, Classic,
and Interpreter show the same result
(Review ID: 95406)
======================================================================
- duplicates
-
JDK-4266583 Regression: DateFormat for short time produces the time twice
- Closed
-
JDK-4268287 DateFormat.getTimeInstance().format() prints extra text
- Closed