There is always the possibility of a bug in Bacula, but no one has reported one.  It "sounds" like you are saying that something is a bug, but I am not sure.

I based the Bacula algorithm on the ISO definition as it existed in 2000, and I never remember seeing anything about a year being more than 365 days.  This is why I came with week 0. If I missed that or the ISO definition has changed, that might be worthwhile reporting.  However, always take what some web site says is an ISO implementation with a grain of salt.  It takes a good amount of time to ensure that an algorithm is correct.

Best regards,
Kern

On 01/05/2016 01:30 PM, pietersnld wrote:
Peter Keller wrote

On 01/04/2016 09:00 AM, pietersnld wrote:

> Found the same in the source code (7.2)
>
> /*
> * Given a Unix date return the week of the year.
> * The returned value can be 0-53. Officially
> * the weeks are numbered from 1 to 53 where week1
> * is the week in which the first Thursday of the
> * year occurs (alternatively, the week which contains
> * the 4th of January). We return 0, if the week of the
> * year does not fall in the current year.
> */
> int tm_woy(time_t stime)
> {
>
> Think i have to accept an extra differential backup in "week 0". Thanks for
> pointing me to the manual just didn't read the whole part :-(
> (Next time I will check twice if bacula has some exceptions to the
> standards)

Curiously, how does that "alternatively" clause work on Jan 2026?
Is Jan 1 - 3 indeed week 0?

    January 2026
Su Mo Tu We Th Fr Sa
             1  2  3
 4  5  6  7  8  9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31

Later,
-pete
No, ISO weeks start on monday so i reformated your calendar of january 2026.
    January 2026
Mo Tu We Th Fr Sa Su
          1  2  3  4
 5  6  7  8  9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
First thursday in January is week 1. So january 1st is in week 1. Week1 is December 29th 2025 - January 4th 2026 But it gets even stranger. When using bacula's routine the following occurs:
Time : Thu Dec 25 14:13:24 2025
Week : 52

Time : Fri Dec 26 14:13:24 2025
Week : 52

Time : Sat Dec 27 14:13:24 2025
Week : 52

Time : Sun Dec 28 14:13:24 2025
Week : 52

Time : Mon Dec 29 14:13:24 2025
Week : 53

Time : Tue Dec 30 14:13:24 2025
Week : 53

Time : Wed Dec 31 14:13:24 2025
Week : 53

Time : Thu Jan  1 14:13:24 2026
Week : 1

Time : Fri Jan  2 14:13:24 2026
Week : 1

Time : Sat Jan  3 14:13:24 2026
Week : 1

Time : Sun Jan  4 14:13:24 2026
Week : 1

Time : Mon Jan  5 14:13:24 2026
Week : 2

Time : Tue Jan  6 14:13:24 2026
Week : 2

Something to keep in mind! If the last part of the year is actually in the new year bacula will calcutate it as week 53!

Pieter


View this message in context: Re: No Full backup in first weekend of january
Sent from the Bacula - Users mailing list archive at Nabble.com.


------------------------------------------------------------------------------


_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

------------------------------------------------------------------------------
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to