navidrome/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-09 01:29:56 +01:00
package utils
import (
"time"
2022-07-26 22:47:16 +02:00
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
2016-03-09 01:29:56 +01: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-09 01:29:56 +01:00
})
})