我觉得我一定是漏掉了什么,但我就是想不出如何用XQuery在MarkLogic中创建一个UTC时间戳。fn:current-dateTime
函数使用操作系统指定的时区偏移量创建时间戳。
使用服务器端JavaScript很容易做到这一点:
new Date().toISOString()
// 2020-02-07T14:43:32.588Z
谢谢!
发布于 2020-02-07 16:37:36
您可以使用适当的fn函数调整时区,如下所示:
fn:adjust-dateTime-to-timezone(fn:current-dateTime(), xs:dayTimeDuration("PT0H"))
哈!
https://stackoverflow.com/questions/60115746
复制