pg.ddx.io pgsql-jdbc@postgresql.org mailing list archive
help / color / mirror / Atom feedFix for using JDK1.2 instead of JDK1.4 method in date/time/timestampToString
5+ messages / 4 participants
[nested] [flat]
* Fix for using JDK1.2 instead of JDK1.4 method in date/time/timestampToString
@ 2003-07-17 14:29 Kim Ho <kho@redhat.com>
2003-07-17 17:47 ` Re: Fix for using JDK1.2 instead of JDK1.4 method in Kris Jurka <books@ejurka.com>
2003-07-22 05:38 ` Re: Fix for using JDK1.2 instead of JDK1.4 method in date/time/timestampToString Barry Lind <blind@xythos.com>
0 siblings, 2 replies; 5+ messages in thread
From: Kim Ho @ 2003-07-17 14:29 UTC (permalink / raw)
To: pgsql-jdbc; +Cc: Barry Lind <blind@xythos.com>; Fernando Nasser <fnasser@redhat.com>; Dave Cramer <Dave@micro-automation.net>
Uses a slightly longer method of getting the rawoffset and then adding
the DST offset if any.
Cheers,
Kim
Attachments:
fixsetobjectswithtimes.diff (text/plain, 4.0K) download
? temp.diff
Index: Makefile
===================================================================
RCS file: /projects/cvsroot/pgsql-server/src/interfaces/jdbc/Makefile,v
retrieving revision 1.38
diff -c -p -r1.38 Makefile
*** Makefile 12 Feb 2003 06:13:04 -0000 1.38
--- Makefile 17 Jul 2003 14:23:09 -0000
***************
*** 4,10 ****
#
# Copyright (c) 2001, PostgreSQL Global Development Group
#
! # $Header: /projects/cvsroot/pgsql-server/src/interfaces/jdbc/Makefile,v 1.38 2003/02/12 06:13:04 barry Exp $
#
#-------------------------------------------------------------------------
--- 4,10 ----
#
# Copyright (c) 2001, PostgreSQL Global Development Group
#
! # $Header: /cvsroot/pgsql-server/src/interfaces/jdbc/Makefile,v 1.38 2003/02/12 06:13:04 barry Exp $
#
#-------------------------------------------------------------------------
Index: org/postgresql/jdbc1/AbstractJdbc1Statement.java
===================================================================
RCS file: /projects/cvsroot/pgsql-server/src/interfaces/jdbc/org/postgresql/jdbc1/AbstractJdbc1Statement.java,v
retrieving revision 1.27
diff -c -p -r1.27 AbstractJdbc1Statement.java
*** org/postgresql/jdbc1/AbstractJdbc1Statement.java 9 Jul 2003 05:12:04 -0000 1.27
--- org/postgresql/jdbc1/AbstractJdbc1Statement.java 17 Jul 2003 14:23:11 -0000
*************** public abstract class AbstractJdbc1State
*** 2072,2078 ****
if (timezoneLocation>7 && timezoneLocation+3 == s.length())
{
timezone = Integer.parseInt(s.substring(timezoneLocation+1,s.length()));
! localoffset = java.util.Calendar.getInstance().getTimeZone().getOffset(millis);
if (s.charAt(timezoneLocation)=='+')
timezone*=-1;
}
--- 2072,2081 ----
if (timezoneLocation>7 && timezoneLocation+3 == s.length())
{
timezone = Integer.parseInt(s.substring(timezoneLocation+1,s.length()));
! // localoffset = java.util.Calendar.getInstance().getTimeZone().getOffset(millis);
! localoffset = java.util.Calendar.getInstance().getTimeZone().getRawOffset();
! if (java.util.Calendar.getInstance().getTimeZone().inDaylightTime(new java.sql.Date(millis)))
! localoffset += 60*60*1000;
if (s.charAt(timezoneLocation)=='+')
timezone*=-1;
}
*************** public abstract class AbstractJdbc1State
*** 2101,2107 ****
if (timezoneLocation != -1 && timezoneLocation+3 == s.length())
{
timezone = Integer.parseInt(s.substring(timezoneLocation+1,s.length()));
! localoffset = java.util.Calendar.getInstance().getTimeZone().getOffset(millis);
if (s.charAt(timezoneLocation)=='+')
timezone*=-1;
}
--- 2104,2113 ----
if (timezoneLocation != -1 && timezoneLocation+3 == s.length())
{
timezone = Integer.parseInt(s.substring(timezoneLocation+1,s.length()));
! // localoffset = java.util.Calendar.getInstance().getTimeZone().getOffset(millis);
! localoffset = java.util.Calendar.getInstance().getTimeZone().getRawOffset();
! if (java.util.Calendar.getInstance().getTimeZone().inDaylightTime(new java.sql.Time(millis)))
! localoffset += 60*60*1000;
if (s.charAt(timezoneLocation)=='+')
timezone*=-1;
}
*************** public abstract class AbstractJdbc1State
*** 2146,2152 ****
if (timezoneLocation>8 && timezoneLocation+3 == s.length())
{
timezone = Integer.parseInt(s.substring(timezoneLocation+1,s.length()));
! localoffset = java.util.Calendar.getInstance().getTimeZone().getOffset(millis);
if (s.charAt(timezoneLocation)=='+')
timezone*=-1;
}
--- 2152,2161 ----
if (timezoneLocation>8 && timezoneLocation+3 == s.length())
{
timezone = Integer.parseInt(s.substring(timezoneLocation+1,s.length()));
! // localoffset = java.util.Calendar.getInstance().getTimeZone().getOffset(millis);
! localoffset = java.util.Calendar.getInstance().getTimeZone().getRawOffset();
! if (java.util.Calendar.getInstance().getTimeZone().inDaylightTime(new java.sql.Timestamp(millis)))
! localoffset += 60*60*1000;
if (s.charAt(timezoneLocation)=='+')
timezone*=-1;
}
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Fix for using JDK1.2 instead of JDK1.4 method in
2003-07-17 14:29 Fix for using JDK1.2 instead of JDK1.4 method in date/time/timestampToString Kim Ho <kho@redhat.com>
@ 2003-07-17 17:47 ` Kris Jurka <books@ejurka.com>
2003-07-17 17:53 ` Re: Fix for using JDK1.2 instead of JDK1.4 method in date/time/timestampToString Fernando Nasser <fnasser@redhat.com>
1 sibling, 1 reply; 5+ messages in thread
From: Kris Jurka @ 2003-07-17 17:47 UTC (permalink / raw)
To: Kim Ho <kho@redhat.com>; +Cc: pgsql-jdbc; Barry Lind <blind@xythos.com>; Fernando Nasser <fnasser@redhat.com>; Dave Cramer <Dave@micro-automation.net>
On 17 Jul 2003, Kim Ho wrote:
> Uses a slightly longer method of getting the rawoffset and then adding
> the DST offset if any.
>
This is still not good enough. It must be jdk1.1 method to be in the
jdbc1 directory.
Kris Jurka
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Fix for using JDK1.2 instead of JDK1.4 method in date/time/timestampToString
2003-07-17 14:29 Fix for using JDK1.2 instead of JDK1.4 method in date/time/timestampToString Kim Ho <kho@redhat.com>
2003-07-17 17:47 ` Re: Fix for using JDK1.2 instead of JDK1.4 method in Kris Jurka <books@ejurka.com>
@ 2003-07-17 17:53 ` Fernando Nasser <fnasser@redhat.com>
2003-07-17 19:39 ` Re: Fix for using JDK1.2 instead of JDK1.4 method in Kim Ho <kho@redhat.com>
0 siblings, 1 reply; 5+ messages in thread
From: Fernando Nasser @ 2003-07-17 17:53 UTC (permalink / raw)
To: Kris Jurka <books@ejurka.com>; +Cc: Kim Ho <kho@redhat.com>; pgsql-jdbc; Barry Lind <blind@xythos.com>; Dave Cramer <Dave@micro-automation.net>
Kris Jurka wrote:>
> On 17 Jul 2003, Kim Ho wrote:
>
>
>>Uses a slightly longer method of getting the rawoffset and then adding
>>the DST offset if any.
>>
>
>
> This is still not good enough. It must be jdk1.1 method to be in the
> jdbc1 directory.
>
I think is about time to drop support for both JDBC1 and JDK 1.1
--
Fernando Nasser
Red Hat - Toronto E-Mail: fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario M4P 2C9
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Fix for using JDK1.2 instead of JDK1.4 method in
2003-07-17 14:29 Fix for using JDK1.2 instead of JDK1.4 method in date/time/timestampToString Kim Ho <kho@redhat.com>
2003-07-17 17:47 ` Re: Fix for using JDK1.2 instead of JDK1.4 method in Kris Jurka <books@ejurka.com>
2003-07-17 17:53 ` Re: Fix for using JDK1.2 instead of JDK1.4 method in date/time/timestampToString Fernando Nasser <fnasser@redhat.com>
@ 2003-07-17 19:39 ` Kim Ho <kho@redhat.com>
0 siblings, 0 replies; 5+ messages in thread
From: Kim Ho @ 2003-07-17 19:39 UTC (permalink / raw)
To: Fernando Nasser <fnasser@redhat.com>; +Cc: Kris Jurka <books@ejurka.com>; pgsql-jdbc; Barry Lind <blind@xythos.com>; Dave Cramer <Dave@micro-automation.net>
Sorry.
The patch (from before) should work with 1.1 as well. FWIW, I agree with
Fernando.
Cheers,
Kim
On Thu, 2003-07-17 at 13:53, Fernando Nasser wrote:
> Kris Jurka wrote:>
> > On 17 Jul 2003, Kim Ho wrote:
> >
> >
> >>Uses a slightly longer method of getting the rawoffset and then adding
> >>the DST offset if any.
> >>
> >
> >
> > This is still not good enough. It must be jdk1.1 method to be in the
> > jdbc1 directory.
> >
>
>
> I think is about time to drop support for both JDBC1 and JDK 1.1
>
>
>
> --
> Fernando Nasser
> Red Hat - Toronto E-Mail: fnasser@redhat.com
> 2323 Yonge Street, Suite #300
> Toronto, Ontario M4P 2C9
>
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Fix for using JDK1.2 instead of JDK1.4 method in date/time/timestampToString
2003-07-17 14:29 Fix for using JDK1.2 instead of JDK1.4 method in date/time/timestampToString Kim Ho <kho@redhat.com>
@ 2003-07-22 05:38 ` Barry Lind <blind@xythos.com>
1 sibling, 0 replies; 5+ messages in thread
From: Barry Lind @ 2003-07-22 05:38 UTC (permalink / raw)
To: Kim Ho <kho@redhat.com>; +Cc: pgsql-jdbc; Fernando Nasser <fnasser@redhat.com>; Dave Cramer <Dave@micro-automation.net>
Patch applied.
--Barry
Kim Ho wrote:
> Uses a slightly longer method of getting the rawoffset and then adding
> the DST offset if any.
>
> Cheers,
>
> Kim
>
>
>
>
> ------------------------------------------------------------------------
>
> ? temp.diff
> Index: Makefile
> ===================================================================
> RCS file: /projects/cvsroot/pgsql-server/src/interfaces/jdbc/Makefile,v
> retrieving revision 1.38
> diff -c -p -r1.38 Makefile
> *** Makefile 12 Feb 2003 06:13:04 -0000 1.38
> --- Makefile 17 Jul 2003 14:23:09 -0000
> ***************
> *** 4,10 ****
> #
> # Copyright (c) 2001, PostgreSQL Global Development Group
> #
> ! # $Header: /projects/cvsroot/pgsql-server/src/interfaces/jdbc/Makefile,v 1.38 2003/02/12 06:13:04 barry Exp $
> #
> #-------------------------------------------------------------------------
>
> --- 4,10 ----
> #
> # Copyright (c) 2001, PostgreSQL Global Development Group
> #
> ! # $Header: /cvsroot/pgsql-server/src/interfaces/jdbc/Makefile,v 1.38 2003/02/12 06:13:04 barry Exp $
> #
> #-------------------------------------------------------------------------
>
> Index: org/postgresql/jdbc1/AbstractJdbc1Statement.java
> ===================================================================
> RCS file: /projects/cvsroot/pgsql-server/src/interfaces/jdbc/org/postgresql/jdbc1/AbstractJdbc1Statement.java,v
> retrieving revision 1.27
> diff -c -p -r1.27 AbstractJdbc1Statement.java
> *** org/postgresql/jdbc1/AbstractJdbc1Statement.java 9 Jul 2003 05:12:04 -0000 1.27
> --- org/postgresql/jdbc1/AbstractJdbc1Statement.java 17 Jul 2003 14:23:11 -0000
> *************** public abstract class AbstractJdbc1State
> *** 2072,2078 ****
> if (timezoneLocation>7 && timezoneLocation+3 == s.length())
> {
> timezone = Integer.parseInt(s.substring(timezoneLocation+1,s.length()));
> ! localoffset = java.util.Calendar.getInstance().getTimeZone().getOffset(millis);
> if (s.charAt(timezoneLocation)=='+')
> timezone*=-1;
> }
> --- 2072,2081 ----
> if (timezoneLocation>7 && timezoneLocation+3 == s.length())
> {
> timezone = Integer.parseInt(s.substring(timezoneLocation+1,s.length()));
> ! // localoffset = java.util.Calendar.getInstance().getTimeZone().getOffset(millis);
> ! localoffset = java.util.Calendar.getInstance().getTimeZone().getRawOffset();
> ! if (java.util.Calendar.getInstance().getTimeZone().inDaylightTime(new java.sql.Date(millis)))
> ! localoffset += 60*60*1000;
> if (s.charAt(timezoneLocation)=='+')
> timezone*=-1;
> }
> *************** public abstract class AbstractJdbc1State
> *** 2101,2107 ****
> if (timezoneLocation != -1 && timezoneLocation+3 == s.length())
> {
> timezone = Integer.parseInt(s.substring(timezoneLocation+1,s.length()));
> ! localoffset = java.util.Calendar.getInstance().getTimeZone().getOffset(millis);
> if (s.charAt(timezoneLocation)=='+')
> timezone*=-1;
> }
> --- 2104,2113 ----
> if (timezoneLocation != -1 && timezoneLocation+3 == s.length())
> {
> timezone = Integer.parseInt(s.substring(timezoneLocation+1,s.length()));
> ! // localoffset = java.util.Calendar.getInstance().getTimeZone().getOffset(millis);
> ! localoffset = java.util.Calendar.getInstance().getTimeZone().getRawOffset();
> ! if (java.util.Calendar.getInstance().getTimeZone().inDaylightTime(new java.sql.Time(millis)))
> ! localoffset += 60*60*1000;
> if (s.charAt(timezoneLocation)=='+')
> timezone*=-1;
> }
> *************** public abstract class AbstractJdbc1State
> *** 2146,2152 ****
> if (timezoneLocation>8 && timezoneLocation+3 == s.length())
> {
> timezone = Integer.parseInt(s.substring(timezoneLocation+1,s.length()));
> ! localoffset = java.util.Calendar.getInstance().getTimeZone().getOffset(millis);
> if (s.charAt(timezoneLocation)=='+')
> timezone*=-1;
> }
> --- 2152,2161 ----
> if (timezoneLocation>8 && timezoneLocation+3 == s.length())
> {
> timezone = Integer.parseInt(s.substring(timezoneLocation+1,s.length()));
> ! // localoffset = java.util.Calendar.getInstance().getTimeZone().getOffset(millis);
> ! localoffset = java.util.Calendar.getInstance().getTimeZone().getRawOffset();
> ! if (java.util.Calendar.getInstance().getTimeZone().inDaylightTime(new java.sql.Timestamp(millis)))
> ! localoffset += 60*60*1000;
> if (s.charAt(timezoneLocation)=='+')
> timezone*=-1;
> }
>
>
> ------------------------------------------------------------------------
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~2003-07-22 05:38 UTC | newest]
Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-07-17 14:29 Fix for using JDK1.2 instead of JDK1.4 method in date/time/timestampToString Kim Ho <kho@redhat.com>
2003-07-17 17:47 ` Re: Fix for using JDK1.2 instead of JDK1.4 method in Kris Jurka <books@ejurka.com>
2003-07-17 17:53 ` Fernando Nasser <fnasser@redhat.com>
2003-07-17 19:39 ` Re: Fix for using JDK1.2 instead of JDK1.4 method in Kim Ho <kho@redhat.com>
2003-07-22 05:38 ` Re: Fix for using JDK1.2 instead of JDK1.4 method in date/time/timestampToString Barry Lind <blind@xythos.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox