<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
	<link rel="self" type="application/atom+xml" href="https://forum.eggheads.org/app.php/feed/topic/7944" />

	<title>egghelp/eggheads community</title>
	<subtitle>Discussion of eggdrop bots, shell accounts and tcl scripts.</subtitle>
	<link href="https://forum.eggheads.org/index.php" />
	<updated>2004-07-19T15:56:28-04:00</updated>

	<author><name><![CDATA[egghelp/eggheads community]]></name></author>
	<id>https://forum.eggheads.org/app.php/feed/topic/7944</id>

		<entry>
		<author><name><![CDATA[bazn]]></name></author>
		<updated>2004-07-19T15:56:28-04:00</updated>

		<published>2004-07-19T15:56:28-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=38841#p38841</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=38841#p38841"/>
		<title type="html"><![CDATA[calculate time]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=38841#p38841"><![CDATA[
yes works fine much thx <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5155">bazn</a> — Mon Jul 19, 2004 3:56 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[greenbear]]></name></author>
		<updated>2004-07-19T10:50:16-04:00</updated>

		<published>2004-07-19T10:50:16-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=38817#p38817</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=38817#p38817"/>
		<title type="html"><![CDATA[calculate time]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=38817#p38817"><![CDATA[
'unixtime' is the number of seconds since 00:00:00 01/01/1970<br><br>So, 1min = 60sec, 1hour = 3600sec, 1 day = 86400 ..you get the idea...<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=24">greenbear</a> — Mon Jul 19, 2004 10:50 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[bazn]]></name></author>
		<updated>2004-07-19T10:28:24-04:00</updated>

		<published>2004-07-19T10:28:24-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=38815#p38815</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=38815#p38815"/>
		<title type="html"><![CDATA[calculate time]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=38815#p38815"><![CDATA[
um yes thx works fine <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"> <br><br>can u explain me how i calculate the unixtime?<br><br>cheers<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5155">bazn</a> — Mon Jul 19, 2004 10:28 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[greenbear]]></name></author>
		<updated>2004-07-19T10:03:31-04:00</updated>

		<published>2004-07-19T10:03:31-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=38814#p38814</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=38814#p38814"/>
		<title type="html"><![CDATA[calculate time]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=38814#p38814"><![CDATA[
If I understand you correctly you want to check if something is older than 2 hours, and you have the unixtime for when it was written to your db.<br><br>So just take current unixtime - 'the time it was written to the db', and see if its bigger than 7200 (2hours in seconds)<br><div class="codebox"><p>Code: </p><pre><code>if {[expr [unixtime] - $pred_time] &gt; 7200} { # it pre'd more than 2 hours ago.}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=24">greenbear</a> — Mon Jul 19, 2004 10:03 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[bazn]]></name></author>
		<updated>2004-07-19T09:47:29-04:00</updated>

		<published>2004-07-19T09:47:29-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=38811#p38811</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=38811#p38811"/>
		<title type="html"><![CDATA[calculate time]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=38811#p38811"><![CDATA[
hi, thx for your answer but my problem is not to calculate the time format, it is how i must define the variable "back_dvdr" to the right format maybe i have a little understanding problem atm (it's hot outside) <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><br>cheers<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5155">bazn</a> — Mon Jul 19, 2004 9:47 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2004-07-19T08:47:51-04:00</updated>

		<published>2004-07-19T08:47:51-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=38807#p38807</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=38807#p38807"/>
		<title type="html"><![CDATA[calculate time]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=38807#p38807"><![CDATA[
Set the bouth times in the same format, I mean the current time and the old time. Also, have a look <a href="http://forum.egghelp.org/viewtopic.php?p=16402" class="postlink">here</a> and please do use the search function..<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Mon Jul 19, 2004 8:47 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[bazn]]></name></author>
		<updated>2004-07-19T07:20:04-04:00</updated>

		<published>2004-07-19T07:20:04-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=38802#p38802</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=38802#p38802"/>
		<title type="html"><![CDATA[calculate time]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=38802#p38802"><![CDATA[
I there, i have short question,<br><br>I have a DB in which is a date stored in unixtime,  checking back how old it is  works fine, but now i want to implement something like a routine which calculates if the time of the object on the databae is older than a definied time here is my try, but it didn't work :ü<br><div class="codebox"><p>Code: </p><pre><code>if {$what == "DVDR"} {                    set pred_release [lindex $outp 0]                    set pred_section [lindex $outp 1]                    set pred_time [lindex $outp 2]                    set pred_reason [lindex $outp 5]                                        set pred_dbtime [unixtime ]                    incr pred_dbtime -$pred_time                    set pred_time2 $pred_time                    set pred_ago [duration $pred_dbtime]                    set back_dvdr "120"                    incr back_dvdr -$pred_dbtime                    set back_calc [duration $back_dvdr]                                        set pred_time3 [clock format $pred_time2 -format "%D %T"]                                        if {[string tolower $pre_channel1] == [string tolower $chan] &amp;&amp; $back_calc &lt; $pred_ago} {</code></pre></div>so anyone can help me with this?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5155">bazn</a> — Mon Jul 19, 2004 7:20 am</p><hr />
]]></content>
	</entry>
	</feed>
