Skip to Content.
Sympa Menu

freetds - Re: Reading DateTime in MSSQL (6.5) - BUG?

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: joel_trunick AT dell.com
  • To: freetds
  • Subject: Re: Reading DateTime in MSSQL (6.5) - BUG?
  • Date: Wed, 21 Apr 1999 14:31:37



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 );




Archive powered by MHonArc 2.6.24.

Top of Page