Skip to content

Commit fea1a37

Browse files
committed
Merge branch 'pr/91'
Change-Id: I93862fab4569d299feb544e00011eb07141dfc2e
2 parents 429d612 + ca78baa commit fea1a37

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bson/constructor.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ func (ElementConstructor) DateTime(key string, dt int64) *Element {
331331
// Time creates a datetime element with the given key and value.
332332
func (c ElementConstructor) Time(key string, t time.Time) *Element {
333333
// Apply nanoseconds to milliseconds conversion
334-
return c.DateTime(key, t.UnixNano()/int64(time.Millisecond))
334+
return c.DateTime(key, convertTimeToInt64(t))
335335
}
336336

337337
// Null creates a null element with the given key.

0 commit comments

Comments
 (0)