Skip to content

Commit 560ab8f

Browse files
committed
fix swapped T, I values for Timestamp
1 parent cf7d3d6 commit 560ab8f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bson/value.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -817,7 +817,7 @@ func (v *Value) Timestamp() (uint32, uint32) {
817817
if v.data[v.start] != '\x11' {
818818
panic(ElementTypeError{"compact.Element.timestamp", Type(v.data[v.start])})
819819
}
820-
return binary.LittleEndian.Uint32(v.data[v.offset : v.offset+4]), binary.LittleEndian.Uint32(v.data[v.offset+4 : v.offset+8])
820+
return binary.LittleEndian.Uint32(v.data[v.offset+4 : v.offset+8]), binary.LittleEndian.Uint32(v.data[v.offset : v.offset+4])
821821
}
822822

823823
// TimestampOK is the same as Timestamp, except that it returns a boolean

0 commit comments

Comments
 (0)