Skip to content
Snippets Groups Projects
Commit 05d241c1 authored by Robert Anderson's avatar Robert Anderson
Browse files

Base second datetime object off the first, but use ->truncate instead. This...

Base second datetime object off the first, but use ->truncate instead. This passes the timezone to the next object via clone().
parent 14f18699
No related branches found
No related tags found
No related merge requests found
......@@ -296,7 +296,7 @@ sub cleanup
my $now = DateTime->now->set_time_zone($server->{'smradius'}->{'event_timezone'});
# This month..
my $thisMonth = DateTime->new( year => $now->year, month => $now->month, day => 1 );
my $thisMonth = $now->clone()->truncate( to => "month" );
# Last month..
my $lastMonth = $thisMonth->clone()->subtract( months => 1 );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment