jdbc with datetime field - unwanted timezone conversion

From: Virtual Programmer (Programmer_at_discussions.microsoft.com)
Date: 08/27/04


Date: Fri, 27 Aug 2004 16:43:03 -0700

I have a database which contains records each of which has a datetime field.
The database machine is set up as GMT. I access this data from a different
machine which is running in a different timezone (EST for example). The
value returned by the database appears to be offset by some value based on
the local machine's timezone. I just want the raw GMT value regardless of
what timezone the machine running the jdbc driver is running. Any
suggestions how I do this?

I'm using resultset.getTimestamp() and pushing that to a Calendar object if
that helps.



Relevant Pages

  • RE: jdbc with datetime field - unwanted timezone conversion
    ... The date information is in a datetime field in a SQL Server 2000 database on ... it has to guess what the timezone is and makes the ... try writing the date from the database machine running GMT and then ...
    (microsoft.public.sqlserver.jdbcdriver)
  • Re: UTC Time, but how?
    ... Thanks Dmitry and Bruce. ... Ask the user to specify their timezone information when registered, ... Change all database scripts where I did getDateto getutcdate? ... I have to convert that to UTC before saving to database? ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Accurate File Timestamps
    ... 'parent' machine (timezone, drift, warps) and have no relation with the ... put the versions in a separate repository 'database' on both the server ... I stat all files because the app supports ... directly stat-ing the files seems a much cleaner ...
    (comp.unix.programmer)
  • ANN: Sequel 3.4.0 Released
    ... Sequel is a lightweight database access toolkit for Ruby. ... Sequel provides thread safety, connection pooling and a concise DSL ... A timestamps plugin was added for automatically adding ... There are three different timezone settings: ...
    (comp.lang.ruby)
  • Re: using time zones in ASP
    ... then record it somewhere, like a database. ... I'm pretty sure that timezone ... >I have an ASP app that works as an online time clock. ... How can I make the software know which time zone ...
    (microsoft.public.inetserver.asp.general)

Loading