X-Git-Url: http://gb7djk.dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=SMGLog.pm;h=9adf77a75a977d4d7cf01badb9e79aaa29f6fd23;hb=ff9c8c8ded1b0ef402d75d968c07c15d6c4cbe1a;hp=e826a5301a964584854e080778ce507db24f4c3f;hpb=cc5854f21da275162787a052b7e72aa0fbd93de2;p=dweather.git diff --git a/SMGLog.pm b/SMGLog.pm index e826a53..9adf77a 100644 --- a/SMGLog.pm +++ b/SMGLog.pm @@ -53,6 +53,7 @@ sub new my $dir = "$path/$prefix"; $ref->{prefix} = $dir; $ref->{suffix} = $suffix || 'log'; + $ref->{dayno} = int (time / 86400); # make sure the directory exists mkpath($dir, 0, 0777) unless -d $dir;