What is the easiest way to get current unix timestamp via XSL
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
In XSLT2, use the current-dateTime()
function.
In XSLT1 you need the EXSLT extension function date-time()
However, be aware that different processors may behave differently if the function is evaluated more than once in a stylesheet. The 'normal' behavior is for all calls in a given transformation to return the same value, so this cannot be used for profiling.
BTW, you could have done a simple Google search on "xslt timestamp" to get this information.