GNOME Bugzilla – Bug 153425
exslt date - fundamental bug in time zone offset calculations
Last modified: 2009-08-15 18:40:50 UTC
There is a big mistake in time zone offset calculation: A: (OK) date:seconds('1970-01-01T01:00:00+00:00') = "3600" B: (WRONG) date:seconds('1970-01-01T01:00:00+01:00') = "7200" B have to result "0" (utc = local MINUS offset)!
bill@bbrack work $ cat b.xsl <?xml version="1.0"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:date="http://exslt.org/dates-and-times" extension-element-prefixes="date" > <xsl:template match="/"> date:seconds('1970-01-01T01:00:00+00:00') = <xsl:value-of select="date:seconds('1970-01-01T01:00:00+00:00')"/> date:seconds('1970-01-01T01:00:00+01:00') = <xsl:value-of select="date:seconds('1970-01-01T01:00:00+01:00')"/> </xsl:template> </xsl:stylesheet> bill@bbrack work $ xsltproc b.xsl b.xsl <?xml version="1.0"?> date:seconds('1970-01-01T01:00:00+00:00') = 3600 date:seconds('1970-01-01T01:00:00+01:00') = 0 bill@bbrack work $ xsltproc --version Using libxml 20613-CVS2177, libxslt 10110-CVS941 and libexslt 808-CVS941 xsltproc was compiled against libxml 20613, libxslt 10110 and libexslt 808 libxslt 10110 was compiled against libxml 20613 libexslt 808 was compiled against libxml 20613 *** This bug has been marked as a duplicate of 153000 ***
The release of libxslt-1.1.11 should fix this, thanks, Daniel