Add Null values and new measurements

This commit is contained in:
Nise Void 2018-09-28 13:54:28 +02:00
parent c6e735950f
commit c83feeb845
Signed by: NiseVoid
GPG key ID: FBA14AC83EA602F3
8 changed files with 331 additions and 11 deletions

View file

@ -14,7 +14,15 @@ func (t *UnixTimestamp) UnmarshalText(b []byte) error {
if err != nil {
return err
}
*t = UnixTimestamp(time.Unix(i, 0))
var tt time.Time
if len(b) > 10 {
tt = time.Unix(0, i)
} else {
tt = time.Unix(i, 0)
}
*t = UnixTimestamp(tt)
return nil
}