你使用的Go版本是什么( go version
)?
$ go version
go version go1.18.2 darwin/amd64
这个问题在最新版本中是否重现?
是的
你正在使用什么操作系统和处理器架构( go env
)?
go env
输出
$ go env
GO111MODULE="auto"
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/benburkert/Library/Caches/go-build"
GOENV="/Users/benburkert/Library/Application Support/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOINSECURE=""
GOMODCACHE="/Users/benburkert/pkg/mod"
GONOPROXY="github.com/benburkert/*"
GONOSUMDB="github.com/benburkert/*"
GOOS="darwin"
GOPATH="/Users/benburkert"
GOPRIVATE="github.com/benburkert/*"
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/Cellar/go/1.18.2/libexec"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/Cellar/go/1.18.2/libexec/pkg/tool/darwin_amd64"
GOVCS=""
GOVERSION="go1.18.2"
GCCGO="gccgo"
GOAMD64="v1"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD=""
GOWORK=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -arch x86_64 -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/3q/b_j95bxn6_n4z99hyl_8r41r0000gn/T/go-build384942112=/tmp/go-build -gno-record-gcc-switches -fno-common"
GOROOT/bin/go version: go version go1.18.2 darwin/amd64
GOROOT/bin/go tool compile -V: compile version go1.18.2
uname -v: Darwin Kernel Version 20.6.0: Tue Feb 22 21:10:41 PST 2022; root:xnu-7195.141.26~1/RELEASE_X86_64
ProductName: macOS
ProductVersion: 11.6.5
BuildVersion: 20G527
lldb --version: lldb-1300.0.42.3
Swift version 5.5.2-dev
你做了什么?
https://go.dev/play/p/lP9QCQ6Pg1a
你期望看到什么?
退出代码为0
你实际看到了什么?
2009/11/10 23:00:00 resp.ProducedAt: got 2009-11-10 23:00:00 +0000 UTC, want 2009-11-10 22:50:00 +0000 UTC
3条答案
按热度按时间o0lyfsai1#
ProducedAt
的当前值硬编码为time.Now().Truncate(time.Minute).UTC()
,当template.ProducedAt
的值非零时,允许以确定性的方式设置该值。1wnzp6jl2#
https://go.dev/cl/406995提到了这个问题:
ocsp: use produced at timestamp of template when creating a response
2lpgd9683#
CC @golang/security