From c15a4b60305f83ed59849e8cbd0c260b3e141989 Mon Sep 17 00:00:00 2001 From: FMoS Date: Sat, 23 Sep 2023 20:09:42 +0000 Subject: [PATCH] change date format to YYYY-MM-DD --- logger.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/logger.pm b/logger.pm index d4233bd..561de41 100644 --- a/logger.pm +++ b/logger.pm @@ -158,7 +158,7 @@ sub prepareLogFile { my $aChannelName = $_[2]; if(exists($aLogFiles->{$aChannelName})) { - my $filename = localtime->dmy("-").".txt"; + my $filename = localtime->ydm("-").".txt"; if($filename ne $aLogFiles->{$aChannelName}{"filename"}) { close($aLogFiles->{$aChannelName}{"file"}); my $outputFileFolder = $configuration::logFolder."/".$aServerName."/".$aChannelName; @@ -180,12 +180,12 @@ sub prepareLogFile { if(!(-e $outputFileFolder)) { File::Path::make_path($outputFileFolder); } - my $outputFilePath = $outputFileFolder."/".localtime->dmy("-").".txt"; + my $outputFilePath = $outputFileFolder."/".localtime->ydm("-").".txt"; open(my $file, ">>", $outputFilePath); if($file) { printf("[info] Outputting channel '%s' at '%s' to '%s'\n", $aChannelName, $aServerName, $outputFilePath); $aLogFiles->{$aChannelName}{"file"} = $file; - $aLogFiles->{$aChannelName}{"filename"} = localtime->dmy("-").".txt"; + $aLogFiles->{$aChannelName}{"filename"} = localtime->ydm("-").".txt"; $aLogFiles->{$aChannelName}{"names"} = []; } else {