[freetds] Locale specific problem
Lowden, James K
LowdenJK at bernstein.com
Thu Aug 12 11:24:08 EDT 2004
> From: Simon
> Sent: Thursday, August 12, 2004 8:35 AM
> I did some experimenting, and would suggest adding this to the locale.conf:
> date format = %d/%m/%Y %H:%M
OK. The attached patch just adds a default language and character set.
> I wonder why the default wouldn't be "%Y-%m-%d %H:%M". This is how it
> shows up in my Query Analyzer
I'm still not sure why your dates didn't have am/pm attached to them, though.
De: freetds-bounces at lists.ibiblio.org em nome de James K. Lowden
Enviada: qua 11/8/2004 19:31
Para: FreeTDS Development Group
Assunto: Re: [freetds] Locale specific problem
On Tue, 10 Aug 2004 <simon at magazineluiza.com.br> wrote:
> I believe I have a bug in freetds's date-time formatting. The locale on
> my box is ...;LC_TIME=pt_BR;...
> 12:00 is shown as 12:00 and 12:00PM is shown as 12:00... i.e. I canÂ´t
> differentiate between AM and PM. For this locale, it would be normally
> shown as 00:00-23:59.
Welcome to the project.
FreeTDS uses strftime(3) to format date strings:
strftime(char * restrict buf, size_t maxsize,
const char * restrict format,
const struct tm * restrict timeptr);
The format string is taken from locales.conf. There is a built-in default
if its not found, one for each client library (because historically each
has had its own default format). Are you perhaps using ODBC? Cf. 4
odbc.c, line 1034. Else grep for date_fmt.
Probably all you need to do is add a section for pt_BR to locales.conf.
If that doesn't do the trick, please show the output of the attached
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.
If you, as the intended recipient of this message, the purpose of which is to inform and update our clients, prospects and consultants of developments relating to our services and products, would not like to receive further e-mail correspondence from the sender, please "reply" to the sender indicating your wishes. In the U.S.: 1345 Avenue of the Americas, New York, NY 10105.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 459 bytes
Url : http://lists.ibiblio.org/pipermail/freetds/attachments/20040812/ce081e4e/attachment.obj
More information about the FreeTDS