Home > database >  ThingsDB timezone not working as expected
ThingsDB timezone not working as expected

Time:02-03

I want to use a datetime with a specific timezone but ThingsDB doesn't seem to recognise the zone. No error is returned, but the output is not what I expect.

This occurs even with a simple code example:

datetime('2020-12-10T16:08:24Z').to('Europe/Kyiv');

I would expect the above to return:

"2020-12-10T18:08:24 0200"

Instead, I get the following result:

"2020-12-10T16:08:24 0000"

I'm using ThingsDB v1.4.7 which is the latest version at this moment.

CodePudding user response:

Most likely your tzdata package is not the latest. If you have the same problem with other time-zones then the package might not be installed at all.

To install the package on Ubuntu:

sudo apt install tzdata

On Alpine linux:

sudo apk add tzdata
  • Related