update date, destination, integer

This commit is contained in:
Hayden Parker
2016-02-14 22:40:29 -08:00
parent e19d6fa0ab
commit f9706700a1
4 changed files with 37 additions and 18 deletions

View File

@ -7,13 +7,12 @@ import (
type Date [8]byte
//
// Time takes the value stored in date as an 8
// byte big-endian integer representing the
// number of milliseconds since the beginning
// of unix time and converts it to a go time.Time
// Time takes the value stored in date as an 8 byte big-endian integer representing the
// number of milliseconds since the beginning of unix time and converts it to a Go time.Time
// struct.
//
func (date Date) Time() time.Time {
func (date Date) Time() (date_time time.Time) {
seconds := Integer(date[:])
return time.Unix(0, int64(seconds*1000000))
date_time = time.Unix(0, int64(seconds*1000000))
return
}