System data not stored in UTC format for _CREATE_DATE, _LAST_UPDATE field

In database, my date field are all stored in UTC using this format : 2020-12-15T16:24:00.000000000

The issue is the date field that named with a leading underscore such as _CREATE_DATE, _LAST_UPDATE, store data in server time (which used to be in GMT 8).

What have I done to fix this?

  • I have changed the servertime from GMT 8 (default when using alibaba server) to UTC, but the table still use GMT 8 when write new record.

  • I check postgres DB timezone, and the timezone is in GMT 7

It seems like ODK already remember the previous server setting thus keep making new record in the gmt 8 timezone. Is there a way to fix this? Any help would be appreciated :slight_smile:

Hi @aliahadss24,

I’m not completely sure where the timezone comes from but I checked the Sync Endpoint code and I think the timezone comes from Sync Endpoint’s jvm timezone. By default the jvm should take the timezone from the host environment unless it has been configured otherwise.

Could you try setting the timezone of Sync Endpoint’s container/VM then restart Sync Endpoint?

If that doesn’t work please post more information on your deployment configuration. I assume you’re not using the Docker containers supplied by sync-endpoint-default-setup? Since those containers default to UTC.