Subject: Re: SDR Time

From: Mike Minnich <[email-masked]>
Date: Fri, 26 Jun 1998 14:46:10 -0400

> As for how to make a session run forever, set the stop time to 0. Sdr will not
> allow this, but you can make the session and let it be written
> to your cache. Then close sdr and open the cached announcement in a text
> editor. Change the fields of the line that starts with "t=" to 0. 

As an alternative, you can also edit the t= field values such that
you simply extend the session lifetime to as many months as you
need.  It seemed to me at the time that this would insure the 
announcement would be long lived but still have a finite lifetime.

Rather than setting both field values to 0, I just increase the value
of the 2nd field to account for the additional length of time required.

For instance:

t=3093685200 3110821200

has a lifetime of ~6 months.

-- 
Mike Minnich
[email-masked]

---

From: Christoph Fleck <[email-masked]>
Date: Fri, 17 Jul 1998 16:30:39 +0200 (MET DST)

> of the 2nd field to account for the additional length of time required.

If you would like to change easy start & end time similary for a number 
of days (up- or downward), you could use this perl-script called scu 
(SdrCacheUpdate). It change your sdr cache file. If you have a copy of
your announcement you can use even expired announcements for that.
The lenght, daytime and repeat of your announcement will be the same
as before.

List current time only:
> scu .sdr/cache/xxxx

To give 10 days more:
> scu .sdr/cache/xxxx 10

To reduce 5 days:
> scu .sdr/cache/xxxx -5

Rgds,
Christoph Fleck

,------------------------------------------------------------------.
| Referenzzentrum fuer multimediale Teledienste (MMRZ), TU Dresden |
|         Dr. Klaus Koehler, Christoph Fleck, Rainer Kranz         |
| e-mail: [email-masked]             Tel.: 0351 / 463 5653  |
|    WWW: http://www-mm.urz.tu-dresden.de               (GERMANY)  |
`------------------------------------------------------------------'

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

#!/usr/local/bin/perl
# extend the time of a sdr-cache-file, [email-masked] 98/07/17

$var0=$ARGV[0];
$var1=$ARGV[1];

if ( length $var0 == 0 )
{ print "usage: scu cachefile [days]\n";
exit 0
}

sub sdr_time
{ @ctime1=localtime( $_[0] - 2208988800 );
  printf "%02d/%02d/%02d %02d:%02d",
	$ctime1[5],$ctime1[4]+1,$ctime1[3],$ctime1[2],$ctime1[1];
}

die "$var0 No write acess!" unless (-w $var0);
die "$var0.tmp No write acess!" if system ("cp $var0 $var0.tmp");
die "$var0.tmp No read acess!" unless open ( IF, "<$var0.tmp" );
die "$var0 No write acess!" unless open ( OF, ">$var0");

while (<IF>)
{ if (/^s=*/)
  { print "     $_";
  }
  if (/^t=(\d+)\s(\d+)/)
  { $t1= ( $1 + ( 86400 * $var1 ));
    $t2= ( $2 + ( 86400 * $var1 ));
    print OF "t=$t1 $t2\n";
    print "old: t=$1 $2  ( from "; sdr_time( $1 ); print " to "; sdr_time( $2 ); print " )\n";
    if ( $var1 != 0 )
      { print "new: t=$t1 $t2  ( from "; sdr_time( $t1 ); print " to "; sdr_time( $t2 ); print " )\n";
      }
    } else
    { print OF "$_";
  }
}

die "$var0.tmp Write error!" unless close OF;
die "$var0 Read error!" unless close IF;

system ("rm $var0.tmp");
exit 0;

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~