pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Vadim Nasardinov <vadimn@redhat.com>
To: pgsql-jdbc@postgresql.org
Subject: Re: Two millisecond timestamp offset
Date: Fri, 9 Sep 2005 11:11:39 -0400
Message-ID: <200509091111.39630.vadimn@redhat.com> (raw)
In-Reply-To: <1126264710.3069.76.camel@localhost>
References: <1126264710.3069.76.camel@localhost>

On Friday 09 September 2005 07:18, Adrian Cox wrote:
> I couldn't find anything on this with Google, but I've got a 2ms
> offset between the java.sql.Timestamp representation and the string
> representation of a "timestamp with time zone".
> 
> I've tried the following JDBC releases: 8.1dev-401 JDBC 3, 8.0-312
> JDBC 3, pg74.216.jdbc3.jar. The server is the Debian package

Since you're a Debian user, there is a greater-than-zero chance you
may be using a free java runtime like GCJ or some such.  If so, it
would be helpful if you could also mention the version of GCJ that
you're using.  In old versions of GNU Classpath, the implementation of
java.sql.Timestamp was buggy.  (It's a little tricky to get right due
to the fact that the fractional seconds - the "nanos" - are separate
from whole seconds.  Care must be taken when converting this slightly
schizophrenic internal representation to/from milliseconds.)

The only specific bug I remember is this one:
  http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16574

There might have been others.



view thread (4+ messages)

Message-ID: <200509091111.39630.vadimn@redhat.com>
Permalink:  ../200509091111.39630.vadimn@redhat.com/
Also on:    postgresql.org/message-id/200509091111.39630.vadimn@redhat.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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: vadimn@redhat.com
  Subject: Re: Two millisecond timestamp offset
  In-Reply-To: <200509091111.39630.vadimn@redhat.com>
  References: <1126264710.3069.76.camel@localhost> <200509091111.39630.vadimn@redhat.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