Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions helpers/changelogfilter
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ use Time::Zone;

use strict;

$ENV{TZ} = "UTC";
my @wday = qw{Sun Mon Tue Wed Thu Fri Sat};
my @mon = qw{Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec};
my $zone;
Expand Down
6 changes: 3 additions & 3 deletions helpers/check_dates_in_changes
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ if [ X"$1" = X"" ]; then
usage 1
fi

now=`date +%s`
for CHANGES in "$@" ; do

TROUBLE_FOUND=false
Expand Down Expand Up @@ -46,17 +47,16 @@ for CHANGES in "$@" ; do
done
case $DATESTR in
\ [MTWFS][a-z][a-z]*)
break
;;
*)
echo "ERROR: '$DATESTR' is not a date"
TROUBLE_FOUND=true
;;
esac
DATE=`date +%s --date "$DATESTR" 2> /dev/null`
test $? -gt 0 -o -z "$DATE" -o "$LAST_IS_YEAR" != true && {
test $? -gt 0 -o -z "$DATE" -o "$LAST_IS_YEAR" != true -o "$DATE" -gt "$now" && {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you touch this line anyway, could you convert it into more readable if [ ... ] || [ ... ]; then syntax? Currently it's more perl than sh...

echo "$CHANGES"
echo "ERROR: INVALID \"$DATESTR\" "
echo "ERROR: INVALID DATE \"$DATESTR\" "
TROUBLE_FOUND=true
}
;;
Expand Down