Up Prev Next
From: Michael Peppler <mpeppler at MBAY dot NET>
Subject: Re: DateTime Values
Date: Nov 28 1997 5:39PM
> Michael Peppler wrote:
> >A patch would be welcome :-)
> O.K. - here it is (just a description for a manual patch):
> In the directory CTlib, you find the file CTlib.xs. Then you have to
> locate the function initialize() - in my Version 2.08.51 of Sybperl this
> is line 1585. In this function several routines are called and after the
> if((retcode = ct_config(context, CS_SET, CS_NETIO, &netio_type,
> CS_UNUSED, NULL)) != CS_SUCCEED)
> croak("Sybase::CTlib initialize: ct_config(netio) failed");
> you just have to insert this:
> if((retcode = cs_dt_info(context, CS_SET, NULL, CS_DT_CONVFMT,
> CS_UNUSED, "CS_DATES_LONG", 255, NULL)) !=
> croak("Sybase::CTlib initialize: ct_dt_info() failed");
> and after recompiling and installation, you'll get the whole datestring
> (on those locations, which did'nt supply this by default). Maybe this
> will go into Sybperl 2.09 ?!
I did it a little differently...
I added the cs_dt_info() api call, so now you can do
cs_dt_info(CS_SET, CS_DT_CONVFMT, CS_UNUSED, "CS_DATES_LONG");
cs_dt_info(CS_GET, CS_MONTH, 3, $buf);
print "$buf\b"; # prints 'April' for the default locale.
This will be in 2.08_52 which I may release today, as a quick
test before 2.09.
Michael Peppler -||- Data Migrations Inc.
firstname.lastname@example.org -||- http://www.mbay.net/~mpeppler