Added by Wim Looijen over 1 year ago


In the GML created by HALE the time is noted as <ps:legalFoundationDate>2008-12-31T23:00:00Z. We entered only the date 2008-12-31 and in the properties of the transformed data it says 2008-12-31 00:00:00. Why is there a difference?


Replies (3)

RE: Time - Added by Thorsten Reitz over 1 year ago

Hi Wim,

That's a little trap I've occasionally also fallen into. Note that 2008-12-31T23:00:00Z includes the "Z" for Zulu time/UTC - timezone information, while the other time doesn't so it is assumed to be valid in your locale.

All the best,


RE: Time - Added by Wim Looijen about 1 year ago

Hi Thorsten,

We encountered this problem again and have no idea how to circumvent this. We changed the time of the PC to UTC but that doesn't help.

The inputdata only contains a date and not a time, so if we use 01-01-1930 it changes to 31-12-1929 23:00:00.

Any tips?


RE: Time - Added by Simon Templer about 1 year ago

Hi Wim,

the problem here is that hale still uses the "old" Java date types as bindings for the schema elements. These internally assume a time zone information based on the system. This information is implicit and thus it is hard to deal with. In most cases it works out, but it seems not in combination with the DateExtraction function. I created an issue on changing that behavior in hale.

How should the result look like?

As a workaround you can produce time instants in a Groovy script, e.g. like this:

import java.time.*
return Instant.parse("2010-04-01T00:00:00Z")

That will result in the Instant object representing that time being used, which is not converted to a Java Date but has its string representation written to the resulting XML.
Downside is that it will produce a transformation error, because the conversion fails, but that can be safely ignored in this case.