I want to get the offset in seconds from a specified time zone. That is exactly what tz_offset()
in Perl's Time::Zone does: "determines the offset from GMT in seconds of a specified timezone".
Is there already a way of doing this in Go? The input is a string that has the time zone name and that's it, but I know that Go has LoadLocation()
in the time
package, so string => offset or location => offset should be fine.
Input: "MST"
Output: -25200