Hi Amit, It is a so-called epoch timestamp, which is calculated as sec or millisec from 1970-01-01. The documentation shows how to convert dateTime to lock timestamps:
http://docs.marklogic.com/xdmp:document-locks And this function shows how you could go back: https://github.com/grtjn/ml-datetime/blob/master/datetime.xqy#L515 Though the latter assumes epoch timestamps in millisec, whereas lock timestamps seem to be in sec.. Cheers, Geert From: <[email protected]<mailto:[email protected]>> on behalf of amit gope <[email protected]<mailto:[email protected]>> Reply-To: MarkLogic Developer Discussion <[email protected]<mailto:[email protected]>> Date: Thursday, July 27, 2017 at 10:49 AM To: "[email protected]<mailto:[email protected]>" <[email protected]<mailto:[email protected]>> Subject: [MarkLogic Dev General] Date Time value not correct while using DLS API Hi Team. We are using DLS api for one of our projects making different versions of a given document, when the dls:checkout is happening, the entry that is being made for the timestamp value is: <dls:checkout xmlns:dls="http://marklogic.com/xdmp/dls"> <dls:document-uri>http://www.google.com/metadata/core/00-2754195023.xml</dls:document-uri> <dls:annotation>auser</dls:annotation> <dls:timeout>0</dls:timeout> <dls:timestamp>1501144206</dls:timestamp> <sec:user-id xmlns:sec="http://marklogic.com/xdmp/security">7071164303237443533</sec:user-id> </dls:checkout> When we are using the format-dateTime/xdmp:timestamp-to-wallclock(xs:unsignedLong(1501144206)) on the dls:timestamp the date turns out to be 1970-01-01, whereas the checkout was done today, can you please suggest from where the timestamp is getting created and why it dates back to 1970? -- Best Regards Amit
_______________________________________________ General mailing list [email protected] Manage your subscription at: http://developer.marklogic.com/mailman/listinfo/general
