public inbox for java-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug java/19649] New: java.util.Date.getTimezoneOffset returns negated output
@ 2005-01-27  0:38 walters at redhat dot com
  2005-01-27  0:39 ` [Bug java/19649] " walters at redhat dot com
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: walters at redhat dot com @ 2005-01-27  0:38 UTC (permalink / raw)
  To: java-prs

Hi,

Here is a simple test:

public final class Test {
    public static void main(String[] args)  {
        System.out.println(new Date(5).getTimezoneOffset());
}
}

On gcj on my system, this returns -300.  On the JDK, it returns 300.  Attached
is a simple patch which shoudl correct the problem.

-- 
           Summary: java.util.Date.getTimezoneOffset returns negated output
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: java
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: walters at redhat dot com
                CC: gcc-bugs at gcc dot gnu dot org,java-prs at gcc dot gnu
                    dot org


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


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug java/19649] java.util.Date.getTimezoneOffset returns negated output
  2005-01-27  0:38 [Bug java/19649] New: java.util.Date.getTimezoneOffset returns negated output walters at redhat dot com
@ 2005-01-27  0:39 ` walters at redhat dot com
  2005-01-27  0:41 ` [Bug libgcj/19649] " pinskia at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: walters at redhat dot com @ 2005-01-27  0:39 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From walters at redhat dot com  2005-01-27 00:39 -------
Created an attachment (id=8077)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=8077&action=view)
correctly negate getTimezoneOffset


-- 


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


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug libgcj/19649] java.util.Date.getTimezoneOffset returns negated output
  2005-01-27  0:38 [Bug java/19649] New: java.util.Date.getTimezoneOffset returns negated output walters at redhat dot com
  2005-01-27  0:39 ` [Bug java/19649] " walters at redhat dot com
@ 2005-01-27  0:41 ` pinskia at gcc dot gnu dot org
  2005-01-27  0:50 ` pinskia at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-01-27  0:41 UTC (permalink / raw)
  To: java-prs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|java                        |libgcj


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


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug libgcj/19649] java.util.Date.getTimezoneOffset returns negated output
  2005-01-27  0:38 [Bug java/19649] New: java.util.Date.getTimezoneOffset returns negated output walters at redhat dot com
  2005-01-27  0:39 ` [Bug java/19649] " walters at redhat dot com
  2005-01-27  0:41 ` [Bug libgcj/19649] " pinskia at gcc dot gnu dot org
@ 2005-01-27  0:50 ` pinskia at gcc dot gnu dot org
  2005-01-28 17:35 ` marco at gnome dot org
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-01-27  0:50 UTC (permalink / raw)
  To: java-prs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
OtherBugsDependingO|                            |16990
              nThis|                            |


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


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug libgcj/19649] java.util.Date.getTimezoneOffset returns negated output
  2005-01-27  0:38 [Bug java/19649] New: java.util.Date.getTimezoneOffset returns negated output walters at redhat dot com
                   ` (2 preceding siblings ...)
  2005-01-27  0:50 ` pinskia at gcc dot gnu dot org
@ 2005-01-28 17:35 ` marco at gnome dot org
  2005-01-28 20:16 ` walters at redhat dot com
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: marco at gnome dot org @ 2005-01-28 17:35 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From marco at gnome dot org  2005-01-28 17:35 -------
Colin, is this one the cause of the setTimeStamp/getTimeStamp mismatch with
postgre jdbc? I have a testcase for that one in case  it's of any use...

-- 


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


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug libgcj/19649] java.util.Date.getTimezoneOffset returns negated output
  2005-01-27  0:38 [Bug java/19649] New: java.util.Date.getTimezoneOffset returns negated output walters at redhat dot com
                   ` (3 preceding siblings ...)
  2005-01-28 17:35 ` marco at gnome dot org
@ 2005-01-28 20:16 ` walters at redhat dot com
  2005-01-28 21:22 ` mckinlay at redhat dot com
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: walters at redhat dot com @ 2005-01-28 20:16 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From walters at redhat dot com  2005-01-28 20:16 -------
Yeah, I'm almost positive it's the cause.  At least I narrowed down this
behavior difference in JDK versus gcj, but it's possible there's another bug in
there.

Is the test suite patch for mauve?  I think they'd be interested in that.

-- 


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


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug libgcj/19649] java.util.Date.getTimezoneOffset returns negated output
  2005-01-27  0:38 [Bug java/19649] New: java.util.Date.getTimezoneOffset returns negated output walters at redhat dot com
                   ` (4 preceding siblings ...)
  2005-01-28 20:16 ` walters at redhat dot com
@ 2005-01-28 21:22 ` mckinlay at redhat dot com
  2005-01-29  0:30 ` mckinlay at redhat dot com
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: mckinlay at redhat dot com @ 2005-01-28 21:22 UTC (permalink / raw)
  To: java-prs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2005-01-28 21:22:00
               date|                            |


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


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug libgcj/19649] java.util.Date.getTimezoneOffset returns negated output
  2005-01-27  0:38 [Bug java/19649] New: java.util.Date.getTimezoneOffset returns negated output walters at redhat dot com
                   ` (5 preceding siblings ...)
  2005-01-28 21:22 ` mckinlay at redhat dot com
@ 2005-01-29  0:30 ` mckinlay at redhat dot com
  2005-01-29  0:37 ` mckinlay at redhat dot com
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: mckinlay at redhat dot com @ 2005-01-29  0:30 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From mckinlay at redhat dot com  2005-01-29 00:30 -------
I've put a test case for this in mauve:

gnu/testlet/java/util/Date/getTimezoneOffset.java

This test case also exposes some problems with libgcj's underlying TimeZone data. 

This patch looks correct, though. I'm going to check it in.

-- 


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


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug libgcj/19649] java.util.Date.getTimezoneOffset returns negated output
  2005-01-27  0:38 [Bug java/19649] New: java.util.Date.getTimezoneOffset returns negated output walters at redhat dot com
                   ` (6 preceding siblings ...)
  2005-01-29  0:30 ` mckinlay at redhat dot com
@ 2005-01-29  0:37 ` mckinlay at redhat dot com
  2005-01-29  0:44 ` cvs-commit at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: mckinlay at redhat dot com @ 2005-01-29  0:37 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From mckinlay at redhat dot com  2005-01-29 00:37 -------
Turns out its already fixed in GNU Classpath. Re-syncing with their version.

-- 


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


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug libgcj/19649] java.util.Date.getTimezoneOffset returns negated output
  2005-01-27  0:38 [Bug java/19649] New: java.util.Date.getTimezoneOffset returns negated output walters at redhat dot com
                   ` (7 preceding siblings ...)
  2005-01-29  0:37 ` mckinlay at redhat dot com
@ 2005-01-29  0:44 ` cvs-commit at gcc dot gnu dot org
  2005-01-29  0:45 ` mckinlay at redhat dot com
  2005-02-01 13:21 ` pinskia at gcc dot gnu dot org
  10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-01-29  0:44 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-01-29 00:44 -------
Subject: Bug 19649

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	bryce@gcc.gnu.org	2005-01-29 00:43:51

Modified files:
	libjava        : ChangeLog 
	libjava/java/util: Date.java 

Log message:
	2004-01-28  Jeroen Frijters  <jeroen@frijters.net>
	
	PR libgcj/19649
	* java/util/Date.java
	(Date(int,int,int), Date(int,int,int,int,int)): Delegate to other
	constructor.
	(Date(int,int,int,int,int,int)): Fixed to handle out-of-range
	arguments.
	(getTimezoneOffset): Inverted sign.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/ChangeLog.diff?cvsroot=gcc&r1=1.3296&r2=1.3297
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/java/util/Date.java.diff?cvsroot=gcc&r1=1.14&r2=1.15



-- 


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


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug libgcj/19649] java.util.Date.getTimezoneOffset returns negated output
  2005-01-27  0:38 [Bug java/19649] New: java.util.Date.getTimezoneOffset returns negated output walters at redhat dot com
                   ` (8 preceding siblings ...)
  2005-01-29  0:44 ` cvs-commit at gcc dot gnu dot org
@ 2005-01-29  0:45 ` mckinlay at redhat dot com
  2005-02-01 13:21 ` pinskia at gcc dot gnu dot org
  10 siblings, 0 replies; 12+ messages in thread
From: mckinlay at redhat dot com @ 2005-01-29  0:45 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From mckinlay at redhat dot com  2005-01-29 00:45 -------
Fixed

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


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


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug libgcj/19649] java.util.Date.getTimezoneOffset returns negated output
  2005-01-27  0:38 [Bug java/19649] New: java.util.Date.getTimezoneOffset returns negated output walters at redhat dot com
                   ` (9 preceding siblings ...)
  2005-01-29  0:45 ` mckinlay at redhat dot com
@ 2005-02-01 13:21 ` pinskia at gcc dot gnu dot org
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-02-01 13:21 UTC (permalink / raw)
  To: java-prs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.0.0


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


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2005-02-01 13:21 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-01-27  0:38 [Bug java/19649] New: java.util.Date.getTimezoneOffset returns negated output walters at redhat dot com
2005-01-27  0:39 ` [Bug java/19649] " walters at redhat dot com
2005-01-27  0:41 ` [Bug libgcj/19649] " pinskia at gcc dot gnu dot org
2005-01-27  0:50 ` pinskia at gcc dot gnu dot org
2005-01-28 17:35 ` marco at gnome dot org
2005-01-28 20:16 ` walters at redhat dot com
2005-01-28 21:22 ` mckinlay at redhat dot com
2005-01-29  0:30 ` mckinlay at redhat dot com
2005-01-29  0:37 ` mckinlay at redhat dot com
2005-01-29  0:44 ` cvs-commit at gcc dot gnu dot org
2005-01-29  0:45 ` mckinlay at redhat dot com
2005-02-01 13:21 ` pinskia at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).