小智 6

https://docs.mongodb.com/manual/reference/bson-types/#timestamps

在mongodb官网可以看到,BSON Timestamps包含两个值,'T' for the seconds since Unix epoch'I' for an incrementing ordinal for operations within a given second

因此,如果你想将 bson 时间戳转换为 time.Time,你可以使用time.Unix(timestamp.T, 0)