Commit cc7502ba authored by Boris Mühmer's avatar Boris Mühmer
Browse files

added time tests

parent 3f2b0fdc
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
package rockaroundtheclock
+17 −0
Original line number Diff line number Diff line
package rockaroundtheclock

import (
	"testing"
	"time"
)

func TestHexToTimestamp(t *testing.T) {
	ticks := 0xa067bfbc
	t.Logf("ticks: %d", ticks)

	ts := time.Unix(int64(ticks), 0)
	t.Logf("Time: %s", ts.String())

	now := time.Now()
	t.Logf("now in ticks: %d", now.UTC().Unix())
}