Go relies on the operating system for timezone data, so when you do time.LoadLocation("America/Guayaquil")
, it runs code that's different in different OSes. If you use a Docker container to run your code, it's possible to include this data in the form of a .zip file.
Here's how to do this:
Get the zoneinfo.zip file from the Go directory, located in
$GOROOT/lib/time/zoneinfo.zip
.In your Dockerfile, add these lines: (this assumes the .zip file is on the same directory)
ADD zoneinfo.zip /zoneinfo.zip ENV ZONEINFO /zoneinfo.zip
Go will read the environment variable and use the file. There's no step 3.