private[hmac] def isDateValid()

in src/main/scala/com/gu/hmac/HMACHeaders.scala [114:119]


  private[hmac] def isDateValid(date: HMACDate): Boolean = {
    val now = new DateTime(clock.instant().toEpochMilli())
    val delta = Math.abs(date.value.getMillis - now.getMillis)
    val allowedOffset = HmacValidDurationInMinutes * MinuteInMilliseconds
    delta <= allowedOffset
  }