Re: [xslt] date:time($some) strange result
- From: Charles Bozeman <cbozeman hiwaay net>
- To: The Gnome XSLT library mailing-list <xslt gnome org>
- Subject: Re: [xslt] date:time($some) strange result
- Date: Sat, 16 Oct 2004 20:07:57 -0500
On Sat, 2004-10-16 at 13:56, Vladimir Grebenschikov wrote:
> В сб, 16/10/2004 в 10:07 -0500, Charles Bozeman пишет:
> > When your timezone is set to GMT there is no timezone offset (+/-HH:MM)
> > therefore it is not displayed. The behavior you are seeing is correct.
> > Did you find the problem stated in your original email?
>
> Yes, actually I was not sure, why in one case it returns time with
> offset and in another case it returns time without offset.
>
> Another question, have tried to find exslt function that will display
> time (HH:MM:SS) and have not found such function, only format-date() on
> XSLT itself.
>
> May be I miss something ?
I don't see any exslt function that directly gives you time in HH:MM:SS
only format. The EXSLT web site shows an implementation of format-date()
in exslt functions; you might want to try that one.
>
> > Charlie B.
> >
> > On Sat, 2004-10-16 at 06:41, Vladimir Grebenschikov wrote:
> > > В пт, 15/10/2004 в 14:17 -0500, cbozeman hiwaay net пишет:
> > > > The result you get is obviously wrong, however using libxslt-1.1.11 I get:
> > > > 17:51:07+04:00 which is correct. Maybe you need to upgrade.
> > >
> > >
> > > I have tried with libxslt-1.1.11.
> > >
> > > I have found reason, it does not show +HH:MM for GMT TZ:
> > > This code:
> > >
> > > <xsl:template match="/">
> > > .
> > > <xsl:value-of select="date:time('2004-10-11T13:51:07+00:00')"/>;
> > > <xsl:value-of select="date:time('2004-10-11T13:51:07+04:00')"/>;
> > > <xsl:value-of select="date:time()"/>;
> > > </xsl:template>
> > >
> > > shows:
> > > .
> > > 13:51:07;
> > > 13:51:07+04:00;
> > > 15:35:06+04:00;
> > > when I run it without TZ specify,
> > >
> > > shows:
> > > .
> > > 13:51:07;
> > > 13:51:07+04:00;
> > > 11:35:45;
> > > when TZ set to GMT:
> > > (env TZ=GMT xsltproc dt.xsl dt.xsl)
> > >
> > > Not sure that it is completely right.
> > >
> > >
> > > > Charlie B.
> > > >
> > > > Quoting Vladimir Grebenschikov <vova sw ru>:
> > > >
> > > > >
> > > > > Hi
> > > > >
> > > > > I try to use EXSLT date: xmlns:date="http://exslt.org/dates-and-times"
> > > > >
> > > > > Is following result '13:51:07+04:00' is expected for
> > > > > date:time('2004-10-11T17:51:07+04:00') XPath expression ?
> > > > >
> > > > > While date:time() returns time without zone-shift:
> > > > > '13:51:07'
> > > > >
> > > > > --
> > > > > Vladimir B. Grebenschikov
> > > > > SWsoft Inc. vova sw-soft com
> > > > > _______________________________________________
> > > > > xslt mailing list, project page http://xmlsoft.org/XSLT/
> > > > > xslt gnome org
> > > > > http://mail.gnome.org/mailman/listinfo/xslt
> > > > >
> >
> > _______________________________________________
> > xslt mailing list, project page http://xmlsoft.org/XSLT/
> > xslt gnome org
> > http://mail.gnome.org/mailman/listinfo/xslt
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]