[rrd-users] Re: RRDtool "GMT-centric" problem?

Honermann Tom A. TA.Honermann at hosp.wisc.edu
Wed Jan 19 00:03:30 MET 2000


OK, I've been racking my brain trying to figure out a solution to this
problem that doesn't involve a change to the database format, has minimal
side effects, and is relatively automated.  Unfortunately, I don't think
such a solution exists that has acceptable side effects.

So, new proposition:

proceed with the "arbitrary time offset", but include two such offsets.  One
for standard time (TO0 - Time Offset 0), one for daylight savings time (TO1
- Time Offset 1).  For time zones which do not have daylight savings
changes, both of these values would be equal.  For GMT/UCT both would be set
to 0.

To determine which offset should be in use at any given moment, localtime()
should be called with the correct time and the return value->tm_isdst
checked.  If this value is 0, then daylight savings time is _not_ in effect
and TO0 should be used.  If this value is > 0, then daylight savings time
_is_ in effect and TO1 should be used.  If this value < 0, then daylight
savings time is not relevant and TO0 should be used.

The time offsets should be calculated automatically from the local timezone
or taken from the command line when the rrd is created.
It is important to allow input from the command line for at least 1 reason:
An rrd might be created in a timezone other than where it will end up being
used (Think venders shipping pre-made rrd files)

When graphing, a switch of time zones should be displayed on the graph.  I
recommend, a black 1-hour bar when an hour is skipped:

     CST           ######    CDT
                   ######
    ____           ######---/\
 --/    \--/\-__---######     \----___
<-----+-----+-----+-----+-----+-----+----->
    12:00  1:00  2:00  3:00  4:00  5:00

And a (red, orange, yellow, purple, some color not used in the graph) 2-hour
bar when an hour is repeated:
(Note the repeated 2:00 in the timeline.)

     CDT     ############    CST
             ############
    ____     ######__/\-----/\
 --/    \--/\-__---######     \----___
<-----+-----+-----+-----+-----+-----+----->
    12:00  1:00  2:00  2:00  3:00  4:00

Consequences of these changes include:
	This does unfortunately result in changes needing to be made to the
rrd file format.
	This ties a rrd to a specific timezone.  This is not really any
different than before except now it may be tied to a zone other than
GMT/UCT.  Displaying the rrd in a different timezone than it was created for
will result in the same behavior we are trying to fix.
	Probably the introduction of some new bugs :(

I'd like to hear comments from people on whether this all makes any sense or
not.

> -----Original Message-----
> From:	Tobias Oetiker [SMTP:oetiker at ee.ethz.ch]
> Sent:	Friday, January 14, 2000 12:39 AM
> To:	Honermann Tom A.
> Cc:	'steve rader '; 'rrd-users at list.ee.ethz.ch '
> Subject:	[rrd-users] Re: RRDtool "GMT-centric" problem? 
> 
> Yesterday you sent me mail regarding Re: RRDtool "GMT-centric" problem? :
> 
> *>  I'm not sure I agree with this "arbitrary time offset".
> [..[
> *> hours.  There is no perfect fix for this problem (aside from having the
> *> whole world switch to a global time standard and getting rid of the
> notion
> *> of localtime.  (I'll advocate that in my spare time)).  Still, having a
> fix
> *> would be worth the side-effects.  If I get around to getting the patch
> *> implemented, I'll send it in.  Don't expect anything soon however.  If
> *> someone else has time to work on it, that would be way cool.
> 
> but what data do you use? the data in the rra is GMT based ... so where do
> you get you CST data from ?
> 
> cheers
> tobi
> 
> 
> -- 
>  ______    __   _
> /_  __/_  / /  (_) Oetiker, Timelord & SysMgr @ EE-Dept ETH-Zurich
>  / // _ \/ _ \/ / TEL: +41(0)1-6325286  FAX:...1517  ICQ: 10419518 
> /_/ \.__/_.__/_/ oetiker at ee.ethz.ch http://ee-staff.ethz.ch/~oetiker
> 
> --
> Unsubscribe mailto:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe
> Help        mailto:rrd-users-request at list.ee.ethz.ch?subject=help
> Archive     http://www.ee.ethz.ch/~slist/rrd-users

--
Unsubscribe mailto:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:rrd-users-request at list.ee.ethz.ch?subject=help
Archive     http://www.ee.ethz.ch/~slist/rrd-users



More information about the rrd-users mailing list