Re: [htdig] Translation of output


Torsten Neuer (tneuer@inwise.de)
Tue, 6 Jul 1999 14:39:48 +0200


According to Geoff Hutchison:
>Torsten Neuer wrote:
>> Sorry, should've been "<= 3.1.2"- - so without the patch, date_format
>> might give an incorrect result (depending on what you want to be in
>> there). As I said, this has been fixed in the CVS.
>
>If you know about when the patch was made (or better yet, the ChangeLog
>entry), I'll pull it out of the CVS tree and post it.

Should be in the htdig3-dev mailing list archives and probably also
in the bug report database (bug report #554).

The submitted patch was:

------------------------- begin patch ----------------------------
*** htsearch/Display.cc~
--- htsearch/Display.cc
***************
*** 20,25 ****
--- 20,26 ----
  #include <stdio.h>
  #include <ctype.h>
  #include <syslog.h>
+ #include <locale.h>
  #include "HtURLCodec.h"
  #include "HtWordType.h"
  
***************
*** 318,329 ****
--- 319,335 ----
              {
                      struct tm *tm = localtime(&t);
                      char *datefmt = config["date_format"];
+ char *locale = config["locale"];
                      if (!datefmt || !*datefmt)
                          {
                              if (config.Boolean("iso_8601"))
                                      datefmt = "%Y-%m-%d %H:%M:%S %Z";
                              else
                                      datefmt = "%x";
+ }
+ if ( locale && *locale )
+ {
+ setlocale(LC_TIME,locale);
                          }
                      strftime(buffer, sizeof(buffer), datefmt, tm);
                      *str << buffer;
-------------------------- end patch ----------------------------

There might be minor differences in the CVS though.

cheers,
  Torsten

--
InWise - Wirtschaftlich-Wissenschaftlicher Internet Service GmbH
Waldhofstraße 14                            Tel: +49-4101-403605
D-25474 Ellerbek                            Fax: +49-4101-403606
E-Mail: info@inwise.de            Internet: http://www.inwise.de

------------------------------------ To unsubscribe from the htdig mailing list, send a message to htdig@htdig.org containing the single word "unsubscribe" in the SUBJECT of the message.



This archive was generated by hypermail 2.0b3 on Tue Jul 06 1999 - 05:02:07 PDT