I
I
impressive172020-09-09 12:39:08
go
impressive17, 2020-09-09 12:39:08

Why doesn't time.LoadLocation golang work?

The LoadLocation function of the time package does not work. The documentation says that perhaps the OS does not have a database of time zones - https://golang.org/pkg/time/#LoadLocation
Please tell me where to get this archiver and where to put it so that everything works?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
sgaynetdinov, 2020-09-09
@sgaynetdinov

> Tell me, please, where to get this archiver and where to put it so that everything works?
The documentation also says:

LoadLocation looks in the directory or uncompressed zip file named by the ZONEINFO environment variable, if any, then looks in known installation locations on Unix systems, and finally looks in $GOROOT/lib/time/zoneinfo.zip.

It is advisable to attach an example of code that does not work to the question, indicate your OS and other details of your environment.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question