xsl-list
[Top] [All Lists]

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

2009-09-08 11:38:39

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(_dot_)Honnen(_at_)gmx(_dot_)de
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
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/

--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
--~--


_________________________________________________________________
Use Hotmail to send and receive mail from your different email accounts.
http://clk.atdmt.com/UKM/go/167688463/direct/01/
--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>