<?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/13477" />

	<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>2007-05-12T05:43:53-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Ace-T]]></name></author>
		<updated>2007-05-12T05:43:53-04:00</updated>

		<published>2007-05-12T05:43:53-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=72685#p72685</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=72685#p72685"/>
		<title type="html"><![CDATA[Time Help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=72685#p72685"><![CDATA[
i would like to say thx for the guidance <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><br>i have completed my mission and have it fully working now <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=8148">Ace-T</a> — Sat May 12, 2007 5:43 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2007-05-11T18:54:36-04:00</updated>

		<published>2007-05-11T18:54:36-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=72682#p72682</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=72682#p72682"/>
		<title type="html"><![CDATA[Time Help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=72682#p72682"><![CDATA[
Then, without knowing the contents of your script, there's not much else I can do...<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Fri May 11, 2007 6:54 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Ace-T]]></name></author>
		<updated>2007-05-11T18:43:37-04:00</updated>

		<published>2007-05-11T18:43:37-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=72681#p72681</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=72681#p72681"/>
		<title type="html"><![CDATA[Time Help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=72681#p72681"><![CDATA[
nothing at all in logs =/<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8148">Ace-T</a> — Fri May 11, 2007 6:43 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2007-05-11T18:29:39-04:00</updated>

		<published>2007-05-11T18:29:39-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=72679#p72679</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=72679#p72679"/>
		<title type="html"><![CDATA[Time Help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=72679#p72679"><![CDATA[
Try setting maxtime to something alittle smaller, that won't overflow. Such as 2000000...<br>In any case, have you tried printing the actual value that you're comparing: ie putlog "$typl : [expr [unixtime] - [clock scan $typl]]", so that you can see what is actually going on?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Fri May 11, 2007 6:29 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Ace-T]]></name></author>
		<updated>2007-05-11T18:22:41-04:00</updated>

		<published>2007-05-11T18:22:41-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=72678#p72678</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=72678#p72678"/>
		<title type="html"><![CDATA[Time Help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=72678#p72678"><![CDATA[
set maxtime 3000000000000000000000<br>if {[expr [unixtime]-[clock scan $typl]]&lt;=$maxtime} {<br><br>putquick "PRIVMSG $channel : TEST -&gt; WORKING"<br>return 0<br>}<br><br><br>just tried that and it dont work, so im lost.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8148">Ace-T</a> — Fri May 11, 2007 6:22 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2007-05-11T18:04:45-04:00</updated>

		<published>2007-05-11T18:04:45-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=72677#p72677</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=72677#p72677"/>
		<title type="html"><![CDATA[Time Help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=72677#p72677"><![CDATA[
Then why don't you re-read the last line in my previous post...<br><div class="codebox"><p>Code: </p><pre><code>expr [unixtime]-[clock scan "2007-05-03 12:35:25"]</code></pre></div> returned a value of 732398 for me, which is quite larger than 300, and hence the conditional would be true, and whatever code you have within your if-statement would be executed.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Fri May 11, 2007 6:04 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Ace-T]]></name></author>
		<updated>2007-05-11T17:56:05-04:00</updated>

		<published>2007-05-11T17:56:05-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=72676#p72676</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=72676#p72676"/>
		<title type="html"><![CDATA[Time Help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=72676#p72676"><![CDATA[
right,<br><br>time is stored in the db as: 2007-05-03 12:35:25<br><br>i want the code to react to if under 300 secs<br><br>and im sure this line does NOT work due to my time not being stored as unixtime, code here -&gt; if {[expr [unixtime]-[clock scan $typl]]&lt;=$maxtime} {<br><br><br>also<br><blockquote class="uncited"><div>$typl is not a table.. it's a variable.. If the value is retrieved from a sql-database using a query, say so. </div></blockquote>yeh i didnt read back what   wrote just stressed cause i cant seem to fix this <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_sad.gif" width="15" height="15" alt=":(" title="Sad"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8148">Ace-T</a> — Fri May 11, 2007 5:56 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2007-05-11T17:41:26-04:00</updated>

		<published>2007-05-11T17:41:26-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=72674#p72674</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=72674#p72674"/>
		<title type="html"><![CDATA[Time Help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=72674#p72674"><![CDATA[
If you just want something to work, you'd be better off posting under "Script Requests".<br><br>$typl is not a table.. it's a variable..  If the value is retrieved from a sql-database using a query, say so.<br><br>That said, most time/date formats used by various sql-dialects can be directly interpreted using "clock scan". The date in your first post works just fine with "clock scan" (tested with: clock format [clock scan "2007-05-03 12:35:25"]). If you are using some different date/time-format, please specify it.'<br><br>Also, you say it should respond if the time delta is less than 300, yet your test in the conditional is wether it is actually greater or equal than 300...<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Fri May 11, 2007 5:41 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Ace-T]]></name></author>
		<updated>2007-05-11T17:27:28-04:00</updated>

		<published>2007-05-11T17:27:28-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=72673#p72673</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=72673#p72673"/>
		<title type="html"><![CDATA[Time Help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=72673#p72673"><![CDATA[
to be all honest all i want is something like thsi working<br><br>set maxtime 300<br>if {[expr [unixtime]-[clock scan $typl]]&gt;=$maxtime} {<br>putlog "$maxtime" <br><br>my time in sql is not in unix time stamps so the code is useless atm,<br>$typl is just a table i made to store the date time ( like 00-00-00 00:00:00)<br><br>i basically need the code to only say some text in irc if the time is under 300 secs, ive been searching the forums for hours for an answer.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8148">Ace-T</a> — Fri May 11, 2007 5:27 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2007-05-11T17:15:21-04:00</updated>

		<published>2007-05-11T17:15:21-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=72672#p72672</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=72672#p72672"/>
		<title type="html"><![CDATA[Time Help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=72672#p72672"><![CDATA[
Right now I can't make heads and tails about what it is you are asking help with... You're just posting fragments that really does'nt make much sense by their own...<br><br>If you are asking for help on constructing a valid sql-query, we'd need help on which dialect of sql you're using (mysql, postgresql, mssql, etc), the actual layout of your database and so forth...<br><br>What I can say, atleast for mysql, is that it is advisable to supply a column-list with INSERT-queries (although not required).<br><br><a href="http://dev.mysql.com/doc/refman/4.1/en/index.html" class="postlink">http://dev.mysql.com/doc/refman/4.1/en/index.html</a> might also be worth a visit.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Fri May 11, 2007 5:15 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Ace-T]]></name></author>
		<updated>2007-05-11T17:00:47-04:00</updated>

		<published>2007-05-11T17:00:47-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=72671#p72671</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=72671#p72671"/>
		<title type="html"><![CDATA[Time Help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=72671#p72671"><![CDATA[
ok found my problem<br><br>its cause the times not stored in unix time stamp so i need to get it into that now..<br><br>but cant seem to do it <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_sad.gif" width="15" height="15" alt=":(" title="Sad"><br><br>here is my query<br><br>set sql "INSERT INTO test VALUES(null, 'TEST', '$text1', '$type', unix_timestamp(now))"<br><br>but wont work &gt;_&gt;<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8148">Ace-T</a> — Fri May 11, 2007 5:00 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2007-05-11T15:37:04-04:00</updated>

		<published>2007-05-11T15:37:04-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=72669#p72669</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=72669#p72669"/>
		<title type="html"><![CDATA[Time Help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=72669#p72669"><![CDATA[
Do you think you could atleast try to explain what you try to achieve, and how your results differ from that?<br>Also, what would "typl" typically be? What could it be?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Fri May 11, 2007 3:37 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Ace-T]]></name></author>
		<updated>2007-05-11T15:09:14-04:00</updated>

		<published>2007-05-11T15:09:14-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=72668#p72668</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=72668#p72668"/>
		<title type="html"><![CDATA[Time Help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=72668#p72668"><![CDATA[
set math [expr [clock seconds] - $typl]<br>putlog "$math"<br><br>or<br><br>set math [expr [unixtime] - $typl]<br>putlog "$math"<br><br><br>what would be better is <br><br>set maxtime 300<br>if {[expr [unixtime]-[clock scan $typl]]&gt;=$maxtime} {<br>putlog "$maxtime"<br><br>but that wont even work =/<br><br><br>i tried putting the put log in for some de bugging and it wouldnt return anything <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_sad.gif" width="15" height="15" alt=":(" title="Sad"><br><br>i have no idea why<br><br>time is stored in the db as: 2007-05-03 12:35:25<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8148">Ace-T</a> — Fri May 11, 2007 3:09 pm</p><hr />
]]></content>
	</entry>
	</feed>
