Fix sig incep/expir rfc1982 calc. needs to be done
This commit is contained in:
parent
aae414d20a
commit
59a200131a
8
types.go
8
types.go
|
@ -792,11 +792,11 @@ func (rr *RR_TSIG) String() string {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Translate the RRSIG's incep. and expir. time to the correct date.
|
// Translate the RRSIG's incep. and expir. time to the correct date.
|
||||||
// Taking into account serial arithmetic (RFC 1982)
|
// Taking into account serial arithmetic (RFC 1982) [TODO]
|
||||||
func timeToDate(t uint32) string {
|
func timeToDate(t uint32) string {
|
||||||
utc := time.Now().Unix()
|
// utc := time.Now().UTC().Unix()
|
||||||
mod := (int64(t) - utc) / Year68
|
// mod := (int64(t) - utc) / Year68
|
||||||
ti := time.Unix(time.Unix(int64(t), 0).Unix()+(mod*Year68), 0) // abs()? TODO
|
ti := time.Unix(int64(t), 0).UTC()
|
||||||
return ti.Format("20060102150405")
|
return ti.Format("20060102150405")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue