BaseXdb/basex — pull request #477 by JensErat (2012-04-08 22:37:39+00:00)
Title: [FIX] Always copy dates before adjusting time zone

Dates were not copied if no casting was needed when adjusting time
zone which resulted in mutable date variables.

Example Query:

let $a := xs:dateTime("2012-01-01T00:00:00.000+00:00")
let $b := adjust-dateTime-to-timezone($a, xs:dayTimeDuration("PT1H"))
return ({$a},{$b})

Expected result:

2012-01-01T00:00:00Z
2012-01-01T01:00:00+01:00

Did return:

2012-01-01T01:00:00+01:00
2012-01-01T01:00:00+01:00

Bug report on [stackoverflow](http://stackoverflow.com/q/10065571/695343).