quintodrome/utils/time_test.go

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

17 lines
340 B
Go
Raw Normal View History

2016-03-08 15:29:56 -09:00
package utils
import (
"time"
2022-07-26 12:47:16 -08:00
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
2016-03-08 15:29:56 -09:00
)
var _ = Describe("Time Conversion", func() {
It("converts from Date to Millis and back to Date", func() {
date := time.Date(2002, 8, 9, 12, 11, 13, 1000000, time.Local)
milli := ToMillis(date)
Expect(ToTime(milli)).To(Equal(date))
2016-03-08 15:29:56 -09:00
})
})