plecos/logrotatewin

Time format incorrect while using dateext

Closed this issue · 0 comments

Hi Plecos,
I have an issue with the dateext option.

The linux man page says:
dateext
Archive old versions of log files adding a daily extension like YYYYMMDD instead of simply adding a number. The extension may be configured using the dateformat option.
dateformat format_string
Specify the extension for dateext using the notation similar to strftime(3) function. Only %Y %m %d and %s specifiers are allowed.

%Y is the year, with the century
%m is the month with 2 digits
%d is the days with 2 digits

But when I use dateext, the filename looks like -201542.gz (for April 2nd) instead of -20150402.gz.

I am not a C# dev, but I think it is easy to fix. I will provide a patched Program.cs.

Regards,
Alex