No subject


Fri May 2 19:13:14 EDT 2003


  The driver isn't properly handling timezone issues for Timestamp
  columns.  (What is the correct behavior since SQLServer doesn't
  properly handle timezone issues either?)  Demonstrated by
  t0001.java.

All times coming back from SQLServer are in local time for the
server.  Java stores time in GMT.  The client has no
way of knowing what timezone the server is in and therefore can't
adjust to it to GMT.

The only hack I've thought of that would mostly work is to have the
JDBC driver do a SELECT GETDATE() the first time it opens the
connection.  It could then compare what it thinks current GMT time is
to what the server thinks current local time is and try determine the
timezone offset from there.  Of course this method fails when you go
into or out of daylight savings time.  It also fails for some weird
timezones that aren't a multiple of an hour away from GMT.

-- 
=======================================================================
 Life is short.                  | Craig Spannring 
      Bike hard, ski fast.       | cts at internetcds.com
 --------------------------------+------------------------------------
 Any sufficiently horrible technology is indistinguishable from Perl.
=======================================================================



More information about the FreeTDS mailing list