mirror of
https://github.com/golang/oauth2.git
synced 2025-07-21 00:00:09 +08:00
google: Make sure time is always in UTC
If times are stored in different time zones, then we occasionally get heisenbugs about expired tokens Change-Id: I0c117977688d8d6c7b12b211092e5040a41a1f46 GitHub-Last-Rev: 3ff51b34f58e0bde7946af59e1215b7d3db65a95 GitHub-Pull-Request: golang/oauth2#482 Reviewed-on: https://go-review.googlesource.com/c/oauth2/+/300929 Reviewed-by: Tyler Bui-Palsulich <tbp@google.com> Trust: Tyler Bui-Palsulich <tbp@google.com> Trust: Cody Oss <codyoss@google.com> Run-TryBot: Tyler Bui-Palsulich <tbp@google.com> TryBot-Result: Go Bot <gobot@golang.org>
This commit is contained in:
parent
9bb904979d
commit
5366d9dc19
@ -14,7 +14,9 @@ import (
|
||||
)
|
||||
|
||||
// now aliases time.Now for testing
|
||||
var now = time.Now
|
||||
var now = func() time.Time {
|
||||
return time.Now().UTC()
|
||||
}
|
||||
|
||||
// Config stores the configuration for fetching tokens with external credentials.
|
||||
type Config struct {
|
||||
|
Loading…
x
Reference in New Issue
Block a user