Skip to Content.
Sympa Menu

freetds - RE: [freetds] Date string differences between FreeTDS and Sybase ASE

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "James McGowan" <jmcgowan AT luxurylink.com>
  • To: "FreeTDS Development Group" <freetds AT lists.ibiblio.org>
  • Subject: RE: [freetds] Date string differences between FreeTDS and Sybase ASE
  • Date: Thu, 18 Dec 2003 16:32:07 -0800

Well, I did as you suggested and tried different configurations of the
[default] and [en_us] sections. No luck thus far.

The docs state that there's no way to display millisecond values with
FreeTDS. We don't care about milliseconds, yet Sybase displays them and thus
they are considered in the function that parses the datetime string. I tried
padding the default FreeTDS setting with a zero as follows:

[default]
date format = %b %d %Y %I:%M:%S0%p

No luck. BTW, using %z in the format results in a segmentation fault.

Don't know if it's worth noting, but that the Sybase locales.conf has only
this as the default date/time setting in locales.dat:

[datetime]
dateformat=dmy

So am I just failing to specify the date format correctly or do I have to go
back to the PHP drawing board and rewrite all of my date/time functions?

> -----Original Message-----
> From: Castellano, Nicholas [mailto:Nicholas_Castellano AT acml.com]
> Sent: Thursday, December 18, 2003 1:32 PM
> To: 'FreeTDS Development Group'
> Subject: RE: [freetds] Date string differences between FreeTDS and
> Sybase ASE
>
>
> > From: James McGowan [mailto:jmcgowan AT luxurylink.com]
> > Sent: Thursday, December 18, 2003 4:22 PM
> > To: FreeTDS Development Group (E-mail)
> > Subject: [freetds] Date string differences between FreeTDS
> > and Sybase ASE
> >
> >
> > I've held off deploying FreeTDS due to a problem with date
> > strings. A raw date queried from SQL Server stored in
> > datetime format looks like this on a system using Sybase ASE 11.0:
> >
> > Dec 18 2003 4:30:00:000PM
> >
> > Using FreeTDS (the problem exists with the stable release as
> > well as for nightly snapshots), the same record looks like this:
> >
> > Dec 18 2003 4:30PM
>
> Have a look at the documentation for "date format" in
> locales.conf. For
> example:
>
> [default]
> date format = %b %d %Y %I:%M:%S.%z%p
>
> [en_US]
> date format = %b %d %Y %I:%M:%S.%z%p
> language = us_english
> char set = iso_1
>
> I dunno why that isn't the default for FreeTDS.
>
> Also I vaguely recall some talk about locales.conf going
> away, so there may
> be a better place for this these days...
>
> --nick
> -----------------------------------------
> The information contained in this transmission may contain
> privileged and confidential information and is intended only
> for the use of the person(s) named above. If you are not the
> intended recipient, or an employee or agent responsible for
> delivering this message to the intended recipient, any
> review, dissemination, distribution or duplication of this
> communication is strictly prohibited. If you are not the
> intended recipient, please contact the sender immediately by
> reply e-mail and destroy all copies of the original message.
> Please note that we do not accept account orders and/or
> instructions by e-mail, and therefore will not be responsible
> for carrying out such orders and/or instructions.
>
>
> _______________________________________________
> FreeTDS mailing list
> FreeTDS AT lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/freetds
>




Archive powered by MHonArc 2.6.24.

Top of Page