Hi,

This looks like a defect to me:

according to 
http://icu-project.org/apiref/icu4j/com/ibm/icu/text/SimpleDateFormat.html 
which is where the xdmp:parse-yymmdd() documentation points to for information 
on the $picture format, using 5 Zs should parse a timezone offset either in 
'(+|-)HH:MM' format, or a 'Z' for UTC.

However, whilst:

xdmp:parse-yymmdd('yyyyMMdd HHmmZZZZZ', '20121023 1030+01:00')

works

xdmp:parse-yymmdd('yyyyMMdd HHmmZZZZZ', '20121023 1030Z')

doesn't.

Hacky Z-detecting work-around is available, but...


Whilst we're at it, wouldn't it be nice if you could do something like:

xdmp:timezone('Europe/London')

and get back the current DST aware time-zone offset in London, or

xdmp:timezone('Europe/Paris', xs:dateTime('2012-11-05T10:30:00Z'))

for the offset somewhere at a particular UTC time?

Ellis.

_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to