summaryrefslogtreecommitdiff
path: root/vendor/modernc.org/libc/libc_darwin.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/modernc.org/libc/libc_darwin.go')
-rw-r--r--vendor/modernc.org/libc/libc_darwin.go12
1 files changed, 2 insertions, 10 deletions
diff --git a/vendor/modernc.org/libc/libc_darwin.go b/vendor/modernc.org/libc/libc_darwin.go
index 1dc5b9260..0ddc96e79 100644
--- a/vendor/modernc.org/libc/libc_darwin.go
+++ b/vendor/modernc.org/libc/libc_darwin.go
@@ -277,11 +277,7 @@ var localtime time.Tm
// struct tm *localtime(const time_t *timep);
func Xlocaltime(_ *TLS, timep uintptr) uintptr {
- loc := gotime.Local
- if r := getenv(Environ(), "TZ"); r != 0 {
- zone, off := parseZone(GoString(r))
- loc = gotime.FixedZone(zone, -off)
- }
+ loc := getLocalLocation()
ut := *(*time.Time_t)(unsafe.Pointer(timep))
t := gotime.Unix(int64(ut), 0).In(loc)
localtime.Ftm_sec = int32(t.Second())
@@ -298,11 +294,7 @@ func Xlocaltime(_ *TLS, timep uintptr) uintptr {
// struct tm *localtime_r(const time_t *timep, struct tm *result);
func Xlocaltime_r(_ *TLS, timep, result uintptr) uintptr {
- loc := gotime.Local
- if r := getenv(Environ(), "TZ"); r != 0 {
- zone, off := parseZone(GoString(r))
- loc = gotime.FixedZone(zone, -off)
- }
+ loc := getLocalLocation()
ut := *(*time_t)(unsafe.Pointer(timep))
t := gotime.Unix(int64(ut), 0).In(loc)
(*time.Tm)(unsafe.Pointer(result)).Ftm_sec = int32(t.Second())