In Go language, time packages supplies functionality for determining as well as viewing time. The Time.Local() function in Go language is used to find “t” with the location that is set to local time. Moreover, this function is defined under the time package. Here, you need to import the “time” package in order to use these functions.
func (t Time) Local() Time
Here, “t” is the stated time.
Return Value: It returns “t” along with the location that is set to local time.
2019-02-11 10:03:00 +0000 UTC
2019-02-11 13:13:24 +0000 UTC
Here, FixedZone() method is used in order to define the location parameter of the Date() method so the time in output is returned according to that location.