How to Work with Datetime Values from Different Time Zones

Goal

Correctly importing date values that differ from the local time zone into Datameer.

Learn

According to Configuring Datameer - Timezone it is possible to define the timezone that should be used for displaying the date in the UI and for parsing date strings that do not specify a timezone by configuring the file:

datameer-install-path/conf/default.properties

the value: 

system.property.das.default-timezone=default

whereby default specifies the local server's timezone.

If, for example, the server is running in timezone CET, but it is necessary to import files which will include datetime values from UTC, an error message will be thrown for values which are not exist due to daylight saving. 

How to import such values correctly?

First import those values as STRING

After the datetime values were all imported as a STRING type into the column DateAsString:

Add the timezone in an next column DateWithTimezone.

#Imported!DateAsString+"-UTC"

Now convert the STRING into a DATE via the function ASDATE by applying a Date and Time Parse Pattern with an available timezone.

ASDATE(#DateWithTimezone;"yyyy-MM-dd'T'HH:mm:ss-ZZZ")