After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 626855 - Dates with timezones but no time components are not normalized correctly
Dates with timezones but no time components are not normalized correctly
Status: RESOLVED FIXED
Product: libxslt
Classification: Platform
Component: general
1.1.26
Other Linux
: Normal normal
: ---
Assigned To: Daniel Veillard
libxml QA maintainers
Depends on:
Blocks:
 
 
Reported: 2010-08-13 15:24 UTC by James Muscat
Modified: 2012-09-04 12:20 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch to behaviour of date/time normalization (1.72 KB, patch)
2010-08-13 15:24 UTC, James Muscat
none Details | Review

Description James Muscat 2010-08-13 15:24:45 UTC
Created attachment 167815 [details] [review]
Patch to behaviour of date/time normalization

Using xsltproc v1.1.26:

$ xsltproc --version
Using libxml 20706, libxslt 10126 and libexslt 815
xsltproc was compiled against libxml 20704, libxslt 10126 and libexslt 815
libxslt 10126 was compiled against libxml 20704
libexslt 815 was compiled against libxml 20704

Dates that have timezone offsets specified but no time components, for example "1970-01-01+01:00", are not normalized correctly; the timezone part is truncated:

date:seconds("1970-01-01") = 0
date:seconds("1970-01-01+01:00") = 0 (not -3600 as expected)

Please find attached a patch that alters the conditions under which exsltDateNormalize() returns without normalizing, and adds test cases demonstrating the new behaviour.
Comment 1 Daniel Veillard 2012-09-04 12:20:49 UTC
Looks fine, thanks a lot, applied and commited upstream !

http://git.gnome.org/browse/libxslt/commit/?id=4ad8f1215e624188416d0f913cad972b9807614e


Daniel