On 1/5/2016 9:01 AM, Kern Sibbald wrote:
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.
The current (and third) version of ISO 8601 was published in 2004.
I think the confusion is that ISO 8601 does not mention a week 0, rather
what tm_woy() is naming week 0 would be named week 52 or week 53 of the
preceding year. In other words, in those years where the first few days
of January would fall in week w52 or w53 of the preceding year, tm_woy()
is returning 0. The problem is that scheduling a job for the first
Thursday of week w01 will always work as expected, whereas the first
Wednesday of w01 will sometimes not. This is neither a bug nor a
misinterpretation of ISO 8601. It is simply not a good way to specify
the first Wednesday of the year. Rather than "the Wednesday in the first
week of the year", one would instead specify the "the first Wednesday in
January".
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
<http://bacula.10910.n7.nabble.com/No-Full-backup-in-first-weekend-of-january-tp11342p82955.html>
Sent from the Bacula - Users mailing list archive
<http://bacula.10910.n7.nabble.com/Bacula-Users-f3.html> 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
------------------------------------------------------------------------------
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users