Iam newbie in Golang. Iam converting a function from PHP to Golang.
I want to get timezone from country code in Golang. It is similar this function in PHP
public static array DateTimeZone::listIdentifiers ([ int $what = DateTimeZone::ALL [, string $country = NULL ]] )
Which function have similar feature in Golang ?
Just tried googling ‘golang time countrycode’, where the first hit is what appears to be a Stack Overflow post where you have gotten lots of answers
As the Stack Overflow answers tell you, a country could have lots of timezones, so it is mostly impossible to go from countrycode to a single timezone. You could go from a geographical position such as GPS coordinates to a timezone I guess.