freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: Craig Spannring <cts AT internetcds.com>
- To: "TDS Development Group" <freetds AT franklin.oit.unc.edu>
- Subject: Re: Reading DateTime in MSSQL (6.5) - BUG?
- Date: Wed, 21 Apr 1999 14:38:09 -0600 (MDT)
That shows how to get the timezone offset of the local Java virtual
machine. The problem is finding the timezone offset of the server.
Transact-SQL does not provide any way to get this information from the
server.
joel_trunick AT dell.com writes:
>
> Here is the correct way to figure out the offset. Apparently the Weblogic
> driver had the same problem and it was later fixed. The following code
> shows how to get the offset (with daylight savings in consideration) for
> the local time zone.
>
> Could this be added to the FreeTDS driver?
>
> Thanks,
> Joel Trunick
> Dell Computer
>
>
>
> ------------------------
> GregorianCalendar cal = new GregorianCalendar();
> int offset = cal.get(Calendar.ZONE_OFFSET) + cal.get(Calendar.DST_OFFSET);
>
> ts = new Timestamp( ts.getTime() - offset );
>
--
=======================================================================
Life is short. | Craig Spannring
Bike hard, ski fast. | cts AT internetcds.com
--------------------------------+------------------------------------
Any sufficiently horrible technology is indistinguishable from Perl.
=======================================================================
-
Reading DateTime in MSSQL (6.5) - BUG?,
joel_trunick, 04/21/1999
- <Possible follow-up(s)>
- Re: Reading DateTime in MSSQL (6.5) - BUG?, Craig Spannring, 04/21/1999
- Re: Reading DateTime in MSSQL (6.5) - BUG?, joel_trunick, 04/21/1999
- Re: Reading DateTime in MSSQL (6.5) - BUG?, Craig Spannring, 04/21/1999
- Re: Reading DateTime in MSSQL (6.5) - BUG?, joel_trunick, 04/22/1999
- Re: Reading DateTime in MSSQL (6.5) - BUG?, joel_trunick, 04/22/1999
- Re: Reading DateTime in MSSQL (6.5) - BUG?, Craig Spannring, 04/27/1999
- Re: Reading DateTime in MSSQL (6.5) - BUG?, joel_trunick, 01/29/2024
Archive powered by MHonArc 2.6.24.