在http://golang.org/src/pkg/time/time.go62 // Equal reports whether t and u represent the same time instant.63 // Two times can be equal even if they are in different locations.64 // For example, 6:00 +0200 CEST and 4:00 UTC are Equal.65 // This comparison is different from using t == u, which also compares66 // the locations.67 func (t Time) Equal(u Time) bool {68 return t.sec == u.sec && t.nsec == u.nsec69 }为什么他们不在乎t.loc和u.loc?更新:如果我有2台服务器(不同的位置),如何判断它们的时间是否完全相等?
- 2 回答
- 0 关注
- 169 浏览
添加回答
举报
0/150
提交
取消