Subject: RE: [xsl] Converting GMT time to user's local time From: <Lalit.Chanchlani@xxxxxxxxxxxxxxxxxx> Date: Mon, 22 Jan 2007 15:28:44 +0530 |
Thanks Michael. One more question: I only get the user's location, for example: Singapore or Hong Kong etc. Is there some kind of mapping where I can match the location with the time-zone? Thanks, Lalit -----Original Message----- From: Michael Kay [mailto:mike@xxxxxxxxxxxx] Sent: Monday, January 22, 2007 1:34 PM To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: RE: [xsl] 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: [xsl] 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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Converting GMT time to us, Michael Kay | Thread | RE: [xsl] Converting GMT time to us, Michael Kay |
RE: [xsl] Converting GMT time to us, Michael Kay | Date | RE: [xsl] Converting GMT time to us, Michael Kay |
Month |