[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Converting GMT time to user's local time

Subject: RE: Converting GMT time to user's local time
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Mon, 22 Jan 2007 12:36:55 -0000
RE:  Converting GMT time to user's local time
> Is there some kind of mapping where I can match the location 
> with the time-zone?

That's part of (a) and is very product dependent. On Java you can get the
Locale appropriate to a particular country, on .NET the equivalent is a
Culture. With Saxon the XSLT processor will pick up the implicit timezone
from the Java default locale, which you can set using Java calls before
invoking Saxon.

Michael Kay
http://www.saxonica.com/

> 
> Thanks,
> Lalit
> 
> -----Original Message-----
> From: Michael Kay [mailto:mike@xxxxxxxxxxxx]
> Sent: Monday, January 22, 2007 1:34 PM
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: RE:  Converting GMT time to user's local time 
> 
> WIth XPath 2.0 you need to:
> 
> (a) ensure that the implicit timezone is the user's timezone 
> (that bit depends on your choice of processor)
> 
> (b) convert your date and time to an xs:dateTime (remember 
> that the timezone can change the date as well as the time)
> 
> (c) apply the adjust-time-to-timezone function. 
> 
> Michael Kay
> http://www.saxonica.com/
> 
> > -----Original Message-----
> > From: Lalit.Chanchlani@xxxxxxxxxxxxxxxxxx
> > [mailto:Lalit.Chanchlani@xxxxxxxxxxxxxxxxxx]
> > Sent: 22 January 2007 07:31
> > To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> > Subject:  Converting GMT time to user's local time
> > 
> > All -
> > I need your help in converting GMT time to a local time of any 
> > particular user using XSL.
> > I receive input XML like from the TV channel provider:
> > <channel name="HBO">
> > <movie>
> >             <name>Braveheart</name>
> >             <date>24JAN2006</date>
> >             <showtime>21:00</showtime> </movie> </channel> The 
> > <showtime> element has GMT time. I want to convert this time to a 
> > user-specific time and return it to user in text format. 
> Example: If a 
> > user logs in from Singapore, he should see this time as his 
> own local 
> > time and so on.
> > Thanks.
> > - Lalit
> > 
> >   
> > 
> > 
> > DISCLAIMER:
> > This message contains privileged and confidential 
> information and is 
> > intended only for an individual named. If you are not the intended 
> > recipient, you should not disseminate, distribute, store, 
> print, copy 
> > or deliver this message.
> > Please notify the sender immediately by e-mail if you have received 
> > this e-mail by mistake and delete this e-mail from your 
> system. E-mail 
> > transmission cannot be guaranteed to be secure or error-free as 
> > information could be intercepted, corrupted, lost, 
> destroyed, arrive 
> > late or incomplete or contain viruses. The sender, therefore,  does 
> > not accept liability for any errors or omissions in the contents of 
> > this message which arise as a result of e-mail transmission. If 
> > verification is required, please request a hard-copy version.
> 
> 
> 
> DISCLAIMER:
> This message contains privileged and confidential information 
> and is intended only for an individual named. If you are not 
> the intended recipient, you should not disseminate, 
> distribute, store, print, copy or deliver this message. 
> Please notify the sender immediately by e-mail if you have 
> received this e-mail by mistake and delete this e-mail from 
> your system. E-mail transmission cannot be guaranteed to be 
> secure or error-free as information could be intercepted, 
> corrupted, lost, destroyed, arrive late or incomplete or 
> contain viruses. The sender, therefore,  does not accept 
> liability for any errors or omissions in the contents of this 
> message which arise as a result of e-mail transmission. If 
> verification is required, please request a hard-copy version.

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.