Hi Gajanan,
 The mark logic version i am using is 4.1.6

The query i used is:

let $datevalue := xs:dateTime("2011-04-20T09:05:00.000-05:00")
return xdmp:strftime("%m/%d/%Y %H:%M:%S", xs:dateTime($datevalue))

it returned: 04/20/2011 19:35:00 which is one hour ahead of the local IST.
How do i tackle this issue? it is related to daylight saving

regards,
Ambika

On Thu, Apr 21, 2011 at 1:16 PM, Gajanan Chinchwadkar <
[email protected]> wrote:

> Hi Ambika,
>
>
>
> Which version of MarkLogic Server are you using? Can you please post the
> exact query and the output?
>
>
>
> If you are using MarkLogic server 4.2 and above, here is another
> possibility to print the dateTime in the format you want:
>
>
>
> Q1)
>
> let $dt:= xs:dateTime("2011-04-20T09:05:00.000-05:00")
>
> return format-dateTime($dt,"[M01]-[D01]-[Y01] [h01]:[m01]:[s01] [Z]"),
>
>
>
> returns: 04-20-11 09:05:00 -0500
>
>
>
> Q2)
>
> let $dt:= xs:dateTime("2011-04-20T09:05:00.000-05:00")
>
> return format-dateTime($dt,"[M01]-[D01]-[Y01] [h01]:[m01]:[s01] [z]"),
>
>
>
> returns: 04-20-11 09:05:00 GMT-05:00
>
>
>
> Q3)
>
> let $dt:= xs:dateTime("2011-04-20T09:05:00.000-05:00")
>
> return format-dateTime($dt,"[M01]-[D01]-[Y01] [h01]:[m01]:[s01]")
>
>
>
> returns: 04-20-11 09:05:00
>
>
>
> Please note the [Z] in Q1, [z] in Q2 and neither in Q3. You can refer to
> W3C XSLT 2.0 spec for the exact syntax of format-dateTime() picture string,
> if you need more variations.
>
>
>
> Do you have any particular question about time-zone and daylight savings in
> MarkLogic that you are experimenting for?
>
>
>
> Rgds,
>
>
>
> Gajanan
>
>
>
> *From:* [email protected] [mailto:
> [email protected]] *On Behalf Of *ambika arumugam
> *Sent:* Wednesday, April 20, 2011 11:59 PM
> *To:* General MarkLogic Developer Discussion
> *Subject:* [MarkLogic Dev General] Reg Time zone and daylight saving in
> marklogic
>
>
>
> Hi all,
>
> I was just trying to understand about the time zone and the daylight saving
> in marklogic. The example I tried is as following:
>
>
>
> 1) I save a time with a time zone (say GMT -5:00 Eastern time (US and
> Canada)) (the data that I used looks like *2011-04-20T09:05:00.000-05:00*)
>
> 2) I retrieve the time from the marklogic server and I pass the value to
> the xdmp:strftime() function to format the obtained value in the *MM-DD-YY
> HH:MM:SS* format.
>
> 3) In the output I obtain, I can see that the retrieved time is 1 hour
> ahead of my local time. My current local time zone is GMT +5:30
>
>
>
> Is this advancement in time due to the daylight saving time setting?
>
>
>
> Can anyone please help me out?
>
> Thanks in advance.
>
>
>
> _______________________________________________
> General mailing list
> [email protected]
> http://developer.marklogic.com/mailman/listinfo/general
>
>
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to