Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
now函数主要是用来返回当前的时间,返回类型为Timestamp
now
func now() Timestamp
Timestamp
Timestamp(google.protobuf.Timestamp)
now()
2023-01-29 16:02:38.536301 +0800 CST m=+0.978455126
int(now())
1674979358
string(now())
2023-01-29T16:02:38.536301+08:00
type(now())
google.protobuf.Timestamp
now()返回的值如果直接输出,则是遵循2006-01-02 15:04:05.999999999 -0700 MST的格式进行输出 其中的m=+0.978455126代表的是相对于程序启动时的时间,这个时间点距离程序启动时间已经过去了0.978455126秒。 可以理解为程序从开始执行到触发time.now()一共使用的时间,正常情况下可以不用理会
2006-01-02 15:04:05.999999999 -0700 MST
Was this page helpful?