2016-02-04 01:14:49 -08:00
|
|
|
package common
|
|
|
|
|
2016-02-14 23:10:37 -08:00
|
|
|
import (
|
2016-03-28 22:16:52 -07:00
|
|
|
"github.com/stretchr/testify/assert"
|
2016-02-14 23:10:37 -08:00
|
|
|
"testing"
|
|
|
|
)
|
2016-02-04 01:14:49 -08:00
|
|
|
|
|
|
|
func TestTimeFromMiliseconds(t *testing.T) {
|
2016-03-28 22:16:52 -07:00
|
|
|
assert := assert.New(t)
|
|
|
|
|
2016-02-04 01:14:49 -08:00
|
|
|
next_day := Date{0x00, 0x00, 0x00, 0x00, 0x05, 0x26, 0x5c, 0x00}
|
|
|
|
go_time := next_day.Time()
|
2016-03-28 22:16:52 -07:00
|
|
|
|
2016-06-19 14:26:03 -07:00
|
|
|
assert.Equal(int64(86400), go_time.Unix(), "Date.Time() did not parse time in milliseconds")
|
2016-02-04 01:14:49 -08:00
|
|
|
}
|