mirror of
https://github.com/go-i2p/go-i2p.git
synced 2025-07-03 21:05:06 -04:00
16 lines
339 B
Go
16 lines
339 B
Go
package common
|
|
|
|
import (
|
|
"github.com/stretchr/testify/assert"
|
|
"testing"
|
|
)
|
|
|
|
func TestTimeFromMiliseconds(t *testing.T) {
|
|
assert := assert.New(t)
|
|
|
|
next_day := Date{0x00, 0x00, 0x00, 0x00, 0x05, 0x26, 0x5c, 0x00}
|
|
go_time := next_day.Time()
|
|
|
|
assert.Equal(int64(86400), go_time.Unix(), "Date.Time() did not parse time in milliseconds")
|
|
}
|