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

	<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-07-21T10:19:36-04:00</updated>

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

		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2007-07-21T10:19:36-04:00</updated>

		<published>2007-07-21T10:19:36-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=74632#p74632</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=74632#p74632"/>
		<title type="html"><![CDATA[Compare two date/time Strings]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=74632#p74632"><![CDATA[
First off, you'd have to convert that into something usable with <a href="http://www.tcl.tk/man/tcl8.4/TclCmd/clock.htm" class="postlink">clock scan</a>.<br>Once you've converted it to an integer clock value (unixtime), use expr to calculate the diff (current time can be obtained from <a href="http://www.tcl.tk/man/tcl8.4/TclCmd/clock.htm" class="postlink">clock seconds</a>), and use the eggdrop-speciffic command <a href="http://www.eggheads.org/support/egghtml/1.6.18/tcl-commands.html#misc" class="postlink">duration</a> to format the output into something human-readable.<br><br>I'd probably do it something like this:<div class="codebox"><p>Code: </p><pre><code>proc timediff {date time} { set t [split $date "."] return [duration [expr [clock seconds] - [clock scan "[lindex $t 2][lindex $t 1][lindex $t 0]T${time}"]]]}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Sat Jul 21, 2007 10:19 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[retan]]></name></author>
		<updated>2007-07-21T09:55:24-04:00</updated>

		<published>2007-07-21T09:55:24-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=74631#p74631</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=74631#p74631"/>
		<title type="html"><![CDATA[Compare two date/time Strings]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=74631#p74631"><![CDATA[
Hello<br>I have a date/time string like this: 30.12.2006 and 10:12:53<br>I want that this string is compared with the UNIX time (the time of the server where the eggdrop is running) and the difference to be outputted in this format:<br>xx years xx months xx days xx hours xx minutes xx seconds<br><br>How can I do that?<br>Thanks!<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9056">retan</a> — Sat Jul 21, 2007 9:55 am</p><hr />
]]></content>
	</entry>
	</feed>
