mirror of
https://gitlab.gnome.org/GNOME/libxslt
synced 2025-11-08 11:02:18 +03:00
one more revision on Norm's localTime() function Daniel
* libxslt/extra.c: one more revision on Norm's localTime() function Daniel
This commit is contained in:
@@ -1,3 +1,7 @@
|
|||||||
|
Wed Aug 1 10:37:50 CEST 2001 Daniel Veillard <daniel@veillard.com>
|
||||||
|
|
||||||
|
* libxslt/extra.c: one more revision on Norm's localTime() function
|
||||||
|
|
||||||
Wed Aug 1 01:37:41 CEST 2001 Thomas Broyer <tbroyer@ltgt.net>
|
Wed Aug 1 01:37:41 CEST 2001 Thomas Broyer <tbroyer@ltgt.net>
|
||||||
|
|
||||||
* libexslt/sets.c: fixed bugs in exsltTrailingFunction and
|
* libexslt/sets.c: fixed bugs in exsltTrailingFunction and
|
||||||
|
|||||||
@@ -164,7 +164,7 @@ xsltFunctionLocalTime(xmlXPathParserContextPtr ctxt, int nargs) {
|
|||||||
xmlXPathObjectPtr obj;
|
xmlXPathObjectPtr obj;
|
||||||
char *str;
|
char *str;
|
||||||
char digits[5];
|
char digits[5];
|
||||||
char result[17];
|
char result[29];
|
||||||
long int field;
|
long int field;
|
||||||
time_t gmt, lmt;
|
time_t gmt, lmt;
|
||||||
struct tm gmt_tm;
|
struct tm gmt_tm;
|
||||||
@@ -254,13 +254,9 @@ xsltFunctionLocalTime(xmlXPathParserContextPtr ctxt, int nargs) {
|
|||||||
memset(result, 0, sizeof(result)); /* "Thu, 26 Jun 2001" */
|
memset(result, 0, sizeof(result)); /* "Thu, 26 Jun 2001" */
|
||||||
/* 0123456789 12345 */
|
/* 0123456789 12345 */
|
||||||
|
|
||||||
strncpy(result, str, 3);
|
strncpy(result, str, 20);
|
||||||
strcpy(result+3, ", ");
|
strcpy(result+20, "???"); /* tzname doesn't work, fake it */
|
||||||
strncpy(result+5, str+8, 2);
|
strncpy(result+23, str+19, 5);
|
||||||
strcpy(result+7, " ");
|
|
||||||
strncpy(result+8, str+4, 3);
|
|
||||||
strcpy(result+11, " ");
|
|
||||||
strncpy(result+12, str+20, 4);
|
|
||||||
|
|
||||||
/* Ok, now result contains the string I want to send back. */
|
/* Ok, now result contains the string I want to send back. */
|
||||||
valuePush(ctxt, xmlXPathNewString((xmlChar *)result));
|
valuePush(ctxt, xmlXPathNewString((xmlChar *)result));
|
||||||
|
|||||||
Reference in New Issue
Block a user