func (e EpochTime) Equal(u EpochTime) bool {
	return time.Time(e).Equal(time.Time(u))
}
Equal provides a comparator for the EpochTime type.
package serialization
import (
	"fmt"
	"strconv"
	"time"
)
type EpochTime time.Time
func (e EpochTime) MarshalJSON() ([]byte, error) {
	ret := strconv.FormatInt(time.Time(e).UTC().Unix(), 10)
	milli := int64(time.Time(e).Nanosecond()) / int64(time.Millisecond)
	if milli > 0 {
		ret += fmt.Sprintf("%03d", milli)
	}
	return []byte(ret), nil
}
func (e *EpochTime) UnmarshalJSON(s []byte) error {
	var (
		err   error
		sec   int64
		milli int64
		nano  int64
	)
	switch l := len(s); {
	case l <= 10:  
		sec, err = strconv.ParseInt(string(s), 10, 64)
	case l > 10 && l <= 16:  
		milli, err = strconv.ParseInt(string(s[0:13]), 10, 64)
		if err != nil {
			return err
		}
		nano = milli * int64(time.Millisecond)
	case l > 16:  
		sec, err = strconv.ParseInt(string(s[0:10]), 10, 64)
		if err != nil {
			return err
		}
		nano, err = strconv.ParseInt(string(s[10:16]), 10, 64)
	default:
		return fmt.Errorf("unable to parse EpochTime: '%s'", s)
	}
	if err != nil {
		return err
	}
	*(*time.Time)(e) = time.Unix(sec, nano).UTC()
	return nil
}