From 623f12b4bda9c977ea075e1a7e4ff32dff5646ca Mon Sep 17 00:00:00 2001 From: Gregory Bartholomew Date: Apr 14 2022 01:07:19 +0000 Subject: Never modify the 'THISWEEK' global constant --- diff --git a/bot/commands.pm b/bot/commands.pm index d363d24..1910a2e 100644 --- a/bot/commands.pm +++ b/bot/commands.pm @@ -206,7 +206,7 @@ sub show { sub eotw { my $user = shift; - my $date = THISWEEK->add('weeks' => 1); + my $date = THISWEEK->clone->add('weeks' => 1); return '' unless $user; diff --git a/bot/commands/fedocal.pm b/bot/commands/fedocal.pm index 262b25f..407d85b 100644 --- a/bot/commands/fedocal.pm +++ b/bot/commands/fedocal.pm @@ -20,7 +20,7 @@ sub tdays { my $filtr = { 'calendar' => 'QA', 'start' => THISWEEK->ymd(), - 'end' => THISWEEK->add('weeks' => 3)->ymd(), + 'end' => THISWEEK->clone->add('weeks' => 3)->ymd(), }; my $mtngs = $api->get('/meetings', $filtr, {}); my $tdays = String::Tagged->new();