Bacula-users

Re: [Bacula-users] All times without time zone?

2009-11-05 22:52:06
Subject: Re: [Bacula-users] All times without time zone?
From: Dan Langille <dan AT langille DOT org>
To: Marek Simon <marek.simon AT trustica DOT cz>
Date: Thu, 05 Nov 2009 22:46:47 -0500
Marek Simon wrote:
> Dan Langille napsal(a):
>> Marek Simon wrote:
>>> Hi,
>>> I am currently solving some performance issues with my instance of 
>>> bacula, so I need to see some statistics of recent jobs. But now I saw 
>>> some jobs with negative duration (WTF!?) I zoom at them and I see all 
>>> of them starts or end at 2009-10-25 between 2-3 am. Daylight saving 
>>> time change. The postgres does the substraction OK, if the time zone 
>>> is ok in the data, but I see the data type of the job.starttime and 
>>> job.endtime is timestamp without time zone and probably of all 
>>> timestamp data in bacula are without time zone as well!
>>> It seems ok because servers usualy do not move between time zones, but 
>>> in Europe does time zones move over the server twice a year (the 
>>> daylight saving time change). And there could arise a big problem not 
>>> only with job statistics but with retention times and of course with 
>>> planning a schedule between 2-3 am.
>>>
>>> I consider that as bug and I am going to report it.
>>> My version is 2.4.4 and I searched the documentation of version 3 and 
>>> there is nothing abot time zone.
>>>
>>> Does anybody have got this problem too?
>> Probably, yes.
>>
>> Retention times might be off by an hour.
>>
>> Set your server to UTC.
> 
> UTC may help. But I need my schedules to fit with time when the people 
> at my site sleep, not when the astronauts in ISS sleep. 

This is irrelevant.  You can schedule your jobs for whatever time you 
want, in UTC zone. It's not that difficult.

> The program 
> should take the time stamp from system with the time zone and store it 
> with time zone, so calculating with it is allways correct because 
> database function are correct about this.

This will not solve the problem of skipped jobs.  Think about it.  If it 
was an easy problem to solve, would it not be solved already?  Google 
for this issue.  It has been discussed before.

> Now some jobs have a hour less 
> and other have a hour more. How can I calculate an avarage duration?
> I think the new version of bacula should work with all time with time 
> zone and I am sure it would be not as difficult as it seems.

Your jobs for that one day are skewed by an hour.

Yes, having it with a timezone would be interesting.  But again, this 
problem goes away if you use UTC on your server.  Adjust your schedule 
to suit.

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users