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>
This commit is contained in:
hopehook 2022-05-10 12:30:43 +08:00 committed by Gopher Robot
parent aedf298daf
commit 41b9d8c75e
3 changed files with 93 additions and 0 deletions

1
api/next/50062.txt Normal file
View file

@ -0,0 +1 @@
pkg time, method (Time) ZoneBounds() (Time, Time) #50062