public Conditionals ifModifiedSince ( LocalDateTime time ) { Preconditions . checkArgument ( match . isEmpty ( ) , String . format ( ERROR_MESSAGE , HeaderConstants . IF_MODIFIED_SINCE , HeaderConstants . IF_MATCH ) ) ; Preconditions . checkArgument ( ! unModifiedSince . isPresent ( ) , String . format ( ERROR_MESSAGE , HeaderConstants . IF_MODIFIED_SINCE , HeaderConstants . IF_UNMODIFIED_SINCE ) ) ; time = time . withNano ( 0 ) ; return new Conditionals ( empty ( ) , noneMatch , Optional . of ( time ) , Optional . empty ( ) ) ; }
You should use the server s time here . Otherwise you might get unexpected results .