1#!/usr/bin/perl -w
2
3# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
4#
5# SPDX-License-Identifier: MPL-2.0
6#
7# This Source Code Form is subject to the terms of the Mozilla Public
8# License, v. 2.0.  If a copy of the MPL was not distributed with this
9# file, you can obtain one at https://mozilla.org/MPL/2.0/.
10#
11# See the COPYRIGHT file distributed with this work for additional
12# information regarding copyright ownership.
13
14use strict;
15use Time::Piece;
16use Time::Seconds;
17
18exit 1 if (scalar(@ARGV) != 2);
19
20my $actual = Time::Piece->strptime($ARGV[0], '%d-%b-%Y %H:%M:%S.000 %z');
21my $expected = Time::Piece->strptime($ARGV[1], '%s') + ONE_WEEK;
22my $diff = abs($actual - $expected);
23
24print($diff . "\n");
25