Time returns the time represented by the Timestamp in bh.
()
| 40 | |
| 41 | // Time returns the time represented by the Timestamp in bh. |
| 42 | func (bh *BlockHeader) Time() time.Time { |
| 43 | tsNano := bh.TimestampMS * uint64(time.Millisecond) |
| 44 | return time.Unix(0, int64(tsNano)).UTC() |
| 45 | } |
| 46 | |
| 47 | func (bh *BlockHeader) Scan(val interface{}) error { |
| 48 | driverBuf, ok := val.([]byte) |
no outgoing calls