1 回答
TA贡献1797条经验 获得超6个赞
请参阅 Go时间包文档和源代码。ATime代表一个没有闰秒的纳秒精度的时间瞬间。该IANA时区数据库用于时区和夏令时。时区数据库包含代表全球许多代表性地点的当地时间历史的代码和数据。它会定期更新,以反映政治机构对时区边界、UTC 偏移量和夏令时规则所做的更改。
type Time struct {
// sec gives the number of seconds elapsed since
// January 1, year 1 00:00:00 UTC.
sec int64
// nsec specifies a non-negative nanosecond
// offset within the second named by Seconds.
// It must be in the range [0, 999999999].
nsec int32
// loc specifies the Location that should be used to
// determine the minute, hour, month, day, and year
// that correspond to this Time.
// Only the zero Time has a nil Location.
// In that case it is interpreted to mean UTC.
loc *Location
}
- 1 回答
- 0 关注
- 232 浏览
添加回答
举报