[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

RE: [xsl] format-dateTime() - using the picture to adjust timezones


Subject: RE: [xsl] format-dateTime() - using the picture to adjust timezones
From: tom tom <tomxsllist@xxxxxxxxxxx>
Date: Tue, 8 Sep 2009 16:38:01 +0100

Unfortunately the only part I have access to is the picture, I cannot use
alternative XSLT functions.



----------------------------------------
> Date: Tue, 8 Sep 2009 15:56:51 +0200
> From: Martin.Honnen@xxxxxx
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: Re: [xsl] format-dateTime() - using the picture to adjust
timezones
>
> tom tom wrote:
>
>> Is there a way to use the Date - Time Picture used as the second argument
in the format-dateTime() (or similar) function so
>> that when it processes the following date:
>>
>> 2009-09-08T07:35:17+08:00
>>
>> the month, day and year can all be rendered in UTC. The above example
refers to 2009-09-07UTC. All my attempts to adjust
>> '[D]' to render as UTC instead of +08:00 have failed.
>
> "adjust" is the right keyword, I think what you want to use is not a
> particular picture string for the format functions but rather the
> function adjust-dateTime-to-timezone e.g.
>
> adjust-dateTime-to-timezone(xs:dateTime('2009-09-08T07:35:17+08:00'),
> xs:dayTimeDuration('PT0H'))
>
> should adjust the dateTime to the UTC meaning you get 2009-09-07T23:35:17Z.
>
> The you can use format-dateTime on the adjusted dateTime value.
>
>
> --
>
> Martin Honnen
> http://msmvps.com/blogs/martin_honnen/
>

_________________________________________________________________
Use Hotmail to send and receive mail from your different email accounts.
http://clk.atdmt.com/UKM/go/167688463/direct/01/


Current Thread
Keywords