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 153425 - exslt date - fundamental bug in time zone offset calculations
exslt date - fundamental bug in time zone offset calculations
Status: VERIFIED DUPLICATE of bug 153000
Product: libxslt
Classification: Platform
Component: general
1.1.9
Other All
: High major
: ---
Assigned To: Daniel Veillard
libxml QA maintainers
Depends on:
Blocks:
 
 
Reported: 2004-09-22 13:23 UTC by Th.-Fischer
Modified: 2009-08-15 18:40 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Th.-Fischer 2004-09-22 13:23:35 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)!
Comment 1 William M. Brack 2004-09-24 23:23:34 UTC
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 ***
Comment 2 Daniel Veillard 2004-09-30 12:13:42 UTC
  The release of libxslt-1.1.11 should fix this,
                                                                                
   thanks,
                                                                                
Daniel