This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libgcj/11941] New: gcj handles timezones wrongly


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11941

           Summary: gcj handles timezones wrongly
           Product: gcc
           Version: 3.3.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: libgcj
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: debian-gcc at lists dot debian dot org
                CC: gcc-bugs at gcc dot gnu dot org

[forwarded from http://bugs.debian.org/203212]

seen with current 3.3 CVS and HEAD.

The bug is: gij subtracts time from GMT time when it should add. Look at output
below:

##### TZ='Europe/Kaliningrad'; export TZ
##### gij Main
Mon Jul 28 13:19:15 GMT-02:00 2003
##### java Main
Mon Jul 28 18:19:22 EEST 2003
##### date
Mon Jul 28 18:19:24 EEST 2003
##### TZ='Europe/Moscow'; export TZ
##### gij Main
Mon Jul 28 12:19:33 GMT-03:00 2003
##### java Main
Mon Jul 28 19:19:37 MSD 2003
##### date
Mon Jul 28 19:19:39 MSD 2003

Moscow's timezone is GMT+3 at summer, not GMT-3.

java is Sun's Java.

##### cat Main.java
import java.util.*;
public class Main {
    public static void main(String[] args) {
        System.out.println(new Date());
    }
}
#####


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]