]> Cypherpunks.ru repositories - gostls13.git/commit
time: add Time.ZoneBounds
authorhopehook <hopehook.com@gmail.com>
Tue, 10 May 2022 04:30:43 +0000 (12:30 +0800)
committerGopher Robot <gobot@golang.org>
Tue, 17 May 2022 03:26:28 +0000 (03:26 +0000)
commit41b9d8c75e45636a153c2a31d117196a22a7fc6c
treeaca1cd471d8f3030570eb1c463256b98d200a2df
parentaedf298daf508b564e4dddc7687fff8822315a5e
time: add Time.ZoneBounds

The method Location.lookup returns the "start" and "end" times bracketing seconds when that zone is in effect.

This CL does these things:

1. Exported the "start" and "end" times as time.Time form
2. Keep the "Location" of the returned times be the same as underlying time

Fixes #50062.

Change-Id: I88888a100d0fc68f4984a85c75a85a83aa3e5d80
Reviewed-on: https://go-review.googlesource.com/c/go/+/405374
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Run-TryBot: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
api/next/50062.txt [new file with mode: 0644]
src/time/time.go
src/time/time_test.go