Hi Robert, Florian,

On Mon, 20 February 2012 Florian Forster <[email protected]> wrote:
> On Tue, Feb 14, 2012 at 01:49:20PM +1030, Robert Mibus wrote:
> > Is there any particular reason not to just use the current system's
> > time? ie. with the attached patch.
> 
> it seemed like a good idea at the time, but clearly we're having more
> trouble with it that it's worth.

The big trouble is that the functions for manipulating UTC time are not
available everywhere...

Initially the time parsing did use timegm() to convert utc time to time_t
but some Unix variant doesn't provide timegm() :( and thus timegm() was
replaced with mktime() which is timezone dependent.

> I'm not quite sure whether to just switch to using the local time or let
> the user chose with a configuration option. What do people think?

That's an option, but using the timestamp provided by bind is more
correct than the time used by collectd (didn't check if collectd's time
is the time at which curl request is submitted or the time at which
curl has returned the data)

In my opinion, only those limited Unix's should use mktime() or just use
collectd's system time but all others use timegm()... choosing the right
path via configure check.
(I think I did send such a patch some time ago)

Best reagrds,
Bruno

> Best regards,
> —octo

Attachment: signature.asc
Description: PGP signature

_______________________________________________
collectd mailing list
[email protected]
http://mailman.verplant.org/listinfo/collectd

Reply via email to