STR_TO_TZ returns null on Windows


I have a Couchbase installation (5.1) and am trying to convert dates between timezones. However, Couchbase cannot find the timezones based on the timezone names and is returning null.

SELECT STR_TO_TZ(‘2018-10-10T12:00:00Z’, ‘America/New_York’) as EST, STR_TO_TZ(‘2018-10-10T12:00:00Z’, ‘UTC’) as UTC;

“EST”: null,
“UTC”: “2018-10-10T12:00:00Z”

I understand that I am probably missing ta TZ_DATA file, but am not sure how/where to install this under Windows. Can anyone provide advice?


Check this out

The solution is to ship the tzdata yourself (linked into your binary or elsewhere) and then call

Or set the %ZONEINFO% environment variable to point to your shipped