[rrd-users] Re: Graph: start of '--step' Consolidation

Li Zhang zl000 at hotmail.com
Fri Apr 15 17:36:02 MEST 2005


Wah, january 1. 1970 was a Thursday!!! ( by the way Windows's calendar is 
from 1980 :-( )

The following is to find starting and ending second of the latest whole week 
  from the author of mrtg-rrd.cgi

@t=localtime(time);
$t[0]=$t[1]=$t[2]=0;

$seconds=timelocal(@t);
$t[6] = ($t[6]+6) % 7;
$seconds -= $t[6]*86400;
$oldseconds = $seconds - 7*86400;

Li



>From: Tobias Oetiker <oetiker at ee.ethz.ch>
>To: Serge Maandag <serge.maandag at staff.zeelandnet.nl>
>CC: Synox <admin at synox.net>,"rrd-users at list.ee.ethz.ch" 
><rrd-users at list.ee.ethz.ch>
>Subject: [rrd-users] Re: Graph: start of '--step' Consolidation
>Date: Fri, 15 Apr 2005 15:21:47 +0200 (MEST)
>
>Note that steps are always aligned to the january 1. 1970 0:00 UTC ...
>
>cheers
>tobi
>
>--
>  ______    __   _
>/_  __/_  / /  (_) Oetiker @ ISG.EE, ETL F24.2, ETH, CH-8092 Zurich
>  / // _ \/ _ \/ /  System Manager, Time Lord, Coder, Designer, Coach
>/_/ \.__/_.__/_/   http://people.ee.ethz.ch/oetiker +41(0)44-632-5286
>
>--
>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://lists.ee.ethz.ch/rrd-users
>WebAdmin    http://lists.ee.ethz.ch/lsg2.cgi
>

_________________________________________________________________
MSN® Calendar keeps you organized and takes the effort out of scheduling 
get-togethers. 
http://join.msn.com/?pgmarket=en-ca&page=byoa/prem&xAPID=1994&DI=1034&SU=http://hotmail.com/enca&HL=Market_MSNIS_Taglines 
  Start enjoying all the benefits of MSN® Premium right now and get the 
first two months FREE*.

--
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://lists.ee.ethz.ch/rrd-users
WebAdmin    http://lists.ee.ethz.ch/lsg2.cgi



More information about the rrd-users mailing list