Fix wrong scfg expiry test in some timezones

Fixes #533.
This commit is contained in:
Lucas Clemente
2017-04-13 16:30:34 +02:00
parent b26d9f92b8
commit dd89967035

View File

@@ -85,7 +85,7 @@ var _ = Describe("Server Config", func() {
}) })
}) })
Context("Reading values fromt the TagMap", func() { Context("Reading values from the TagMap", func() {
var scfg *serverConfigClient var scfg *serverConfigClient
BeforeEach(func() { BeforeEach(func() {
@@ -218,7 +218,7 @@ var _ = Describe("Server Config", func() {
tagMap[TagEXPY] = []byte{0xdc, 0x89, 0x0e, 0x59, 0, 0, 0, 0} // UNIX Timestamp 0x590e89dc = 1494125020 tagMap[TagEXPY] = []byte{0xdc, 0x89, 0x0e, 0x59, 0, 0, 0, 0} // UNIX Timestamp 0x590e89dc = 1494125020
err := scfg.parseValues(tagMap) err := scfg.parseValues(tagMap)
Expect(err).ToNot(HaveOccurred()) Expect(err).ToNot(HaveOccurred())
year, month, day := scfg.expiry.Date() year, month, day := scfg.expiry.UTC().Date()
Expect(year).To(Equal(2017)) Expect(year).To(Equal(2017))
Expect(month).To(Equal(time.Month(5))) Expect(month).To(Equal(time.Month(5)))
Expect(day).To(Equal(7)) Expect(day).To(Equal(7))