Truncate ARI timestamps to millisecond resolution (#485)
It's not useful, and somewhat surprising, for ARI timestamps to have nanosecond precision. Truncate them to millisecond precision to make life easier on clients, and to do something different from Boulder (which truncates to whole-second precision). Fixes https://github.com/letsencrypt/pebble/issues/483
This commit is contained in:
parent
bc21177aca
commit
9a99831fce
|
|
@ -285,8 +285,8 @@ func RenewalInfoSimple(issued time.Time, expires time.Time, now time.Time) *Rene
|
|||
|
||||
return &RenewalInfo{
|
||||
SuggestedWindow: SuggestedWindow{
|
||||
Start: windowStart,
|
||||
End: windowEnd,
|
||||
Start: windowStart.Truncate(time.Millisecond),
|
||||
End: windowEnd.Truncate(time.Millisecond),
|
||||
},
|
||||
}
|
||||
}
|
||||
|
|
@ -300,8 +300,8 @@ func RenewalInfoImmediate(now time.Time) *RenewalInfo {
|
|||
oneHourAgo := now.Add(-1 * time.Hour)
|
||||
return &RenewalInfo{
|
||||
SuggestedWindow: SuggestedWindow{
|
||||
Start: oneHourAgo,
|
||||
End: oneHourAgo.Add(1 * time.Second),
|
||||
Start: oneHourAgo.Truncate(time.Millisecond),
|
||||
End: oneHourAgo.Add(1 * time.Second).Truncate(time.Millisecond),
|
||||
},
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue