#382 Awstats not recognizing 53 week year.



%WY-n is replaced with the week number in year


date && ls -l logs/access.log.*
Tue Dec 28 09:30:43 EST 2004
-rw-r--r-- 1 root root 612908 Nov 8
00:23 logs/access.log.45.gz
-rw-r--r-- 1 root root 723144 Nov 15
00:28 logs/access.log.46.gz
-rw-r--r-- 1 root root 618759 Nov 22
00:29 logs/access.log.47.gz
-rw-r--r-- 1 root root 544406 Nov 29
00:36 logs/access.log.48.gz
-rw-r--r-- 1 root root 625667 Dec 6
00:39 logs/access.log.49.gz
-rw-r--r-- 1 root root 674264 Dec 13
00:55 logs/access.log.50.gz
-rw-r--r-- 1 root root 564782 Dec 20
00:50 logs/access.log.51.gz
-rw-r--r-- 1 root root 478590 Dec 27
01:18 logs/access.log.52.gz
-rw-r--r-- 1 root root 77656 Dec 28
00:00 logs/access.log.53.1.gz
-rw-r--r-- 1 root root 573854 Dec 28
09:27 logs/access.log.53.2

As you can see we need access.log.53.x this week but
awstats returns an error that it can not find the log
file understandable since it states it is looking for
access.log.01.x and there is no provision in the
configuration (that I can find) to deal with this.

Now I'm wondering if it will rectify itself at the
start of the new year next week?


  • etienne massip

    etienne massip - 2008-09-01

    Logged In: YES
    Originator: NO

    I fixed it simply by using POSIX strftime() function, as Apache's rotatelogs is doing, so they both use the same format strings.

    This is preventing any issue of this kind (mis-synchronization between Awstats and other pieces of software), so may I suggest simply to replace current date calculations (which, by the way, are actually erroneous) by the use of this function ? Or is there any hidden complexity behind actual code ?

  • Laurent Destailleur (Eldy)

    Added/Fixed in CVS tree. Will be available in next version.

  • Laurent Destailleur (Eldy)

    The request was closed because date is old.
    Problem might be fixed or patch may be obsolete.

    If this is not true, please resubmit the request.


Log in to post a comment.