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

	<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-01-20T10:41:27-04:00</updated>

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

		<entry>
		<author><name><![CDATA[heman]]></name></author>
		<updated>2007-01-20T10:41:27-04:00</updated>

		<published>2007-01-20T10:41:27-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=69758#p69758</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=69758#p69758"/>
		<title type="html"><![CDATA[convert timeago mysql]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=69758#p69758"><![CDATA[
that worked <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><br>Thanks.<br><br><br>But now I have an other problem while testing the script <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_sad.gif" width="15" height="15" alt=":(" title="Sad"><br><br>So please take a look at:<br><a href="http://forum.egghelp.org/viewtopic.php?p=69757#69757" class="postlink">http://forum.egghelp.org/viewtopic.php?p=69757#69757</a><br><br>Thanks<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8556">heman</a> — Sat Jan 20, 2007 10:41 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2007-01-19T19:23:25-04:00</updated>

		<published>2007-01-19T19:23:25-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=69743#p69743</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=69743#p69743"/>
		<title type="html"><![CDATA[convert timeago mysql]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=69743#p69743"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>proc timeAgo t { foreach {h m s} [split $t :] {  set unixt [clock scan "$h hours $m minutes $s seconds ago"]  break } duration [expr {[unixtime]-$unixt}]}</code></pre></div><blockquote class="uncited"><div>« Opposing » .tcl proc timeAgo t {foreach {h m s} [split $t :] {set unixt [clock scan "$h hours $m minutes $s seconds ago"];break} ; duration [expr {[unixtime]-$unixt}]}<br>« Bot » Tcl:<br>« Opposing » .tcl timeAgo 339:50:57<br>« Bot » Tcl: 2 weeks 3 hours 50 minutes 57 seconds</div></blockquote><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Fri Jan 19, 2007 7:23 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[heman]]></name></author>
		<updated>2007-01-19T18:43:34-04:00</updated>

		<published>2007-01-19T18:43:34-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=69742#p69742</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=69742#p69742"/>
		<title type="html"><![CDATA[convert timeago mysql]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=69742#p69742"><![CDATA[
I need some help, i search around this forum, but couldnt find what im looking for.<br><br>Here goes:<br><br><br>Nicks are stored in a mysql database with the time the nick is added (datetime) like: 2007-19-01 20:01:02 (row is called "addtime")<br><br><br>To find how long ago the nick was stored the script use the folowing:<br><div class="codebox"><p>Code: </p><pre><code> set temp [mysqlsel $db "select *,SEC_TO_TIME(unix_timestamp(now()) - unix_timestamp(addtime)) as data from table WHERE .....</code></pre></div><br>Now it returns someting like: <br><br>nick added to the db 17:50:57 ago<br>nick added to the db 25:50:57 ago<br>nick added to the db 339:50:57 ago<br>etc.<br><br><br>Im trying it will return the time after 24:00:00 like 1day 1hour 50min and 57 sec ago.<br><br>Same with weeks ,months, years<br><br><br>Any idea what i can add to the script to let it announce like this?<br><br>Thanks.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8556">heman</a> — Fri Jan 19, 2007 6:43 pm</p><hr />
]]></content>
	</entry>
	</feed>
