pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Mike Cannon-Brookes <mcannon@internet.com>
To: Pgsql-Interfaces@Postgresql. Org <pgsql-interfaces@postgresql.org>
Subject: JDBC date problem
Date: Wed, 10 Jan 2001 09:53:26 +1100
Message-ID: <AKEBKNIMAHCDBCMEGPBFOECBIOAA.mcannon@internet.com> (raw)

I'm having a problem with dates in the JDBC driver. They are being mangled
when they come through from the database, here are some examples:

> Postgres:			Java:
> 2000-12-20 16:11:00+11	Nov 20 16:00:00 EST 2000

(looks like it's pulling the month from the timezone or minute field?)

It gets worse ;)

> Postgres:			Java:
> 2001-01-03 17:35:00+11	Nov 03 17:00:00 EST 2003

(again, month comes from the timezone field, but 2004?! ;))

And worse still...

> Postgres:			Java:
> 2001-01-02 18:41:00+11	May 02 17:00:00 EST 2004

(now I'm not really sure where anything came from here, besides the day -
every other number seems wrong?)

Some raw data:
Postgres:			 Java:
2000-12-20 16:11:00+11 | 2000-11-20 16:00:00
2001-01-02 18:41:00+11 | 2004-05-02 17:00:00
2001-01-03 17:35:00+11 | 2003-11-03 17:00:00
2000-12-20 15:00:00+11 | 1999-12-20 15:00:00
2001-01-04 19:00:00+11 | 2000-12-04 19:00:00
2001-01-09 11:00:00+11 | 2000-12-09 11:00:00

Any ideas? This is a real stumper and I need to find a solution asap! I'm
using a JDBC driver I built from CVS no more than a month ago.

-mike
____________________________________________________________
Mike Cannon-Brookes - Technology Director, Asia Pacific
internet.com Corporation - The Internet Industry Portal
Ph: (612) 9290 1088 - Mob: 0416 106090

- The Media Network @ http://australia.internet.com
- Meet A Guru @ http://www.breakfastforums.com.au
- Subscribe Online @ http://www.enewsletters.com.au
____________________________________________________________





view thread (12+ messages)  latest in thread

Message-ID: <AKEBKNIMAHCDBCMEGPBFOECBIOAA.mcannon@internet.com>
Permalink:  ../AKEBKNIMAHCDBCMEGPBFOECBIOAA.mcannon@internet.com/
Also on:    postgresql.org/message-id/AKEBKNIMAHCDBCMEGPBFOECBIOAA.mcannon@internet.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: mcannon@internet.com
  Subject: Re: JDBC date problem
  In-Reply-To: <AKEBKNIMAHCDBCMEGPBFOECBIOAA.mcannon@internet.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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