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

	<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>2006-12-11T13:50:34-04:00</updated>

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

		<entry>
		<author><name><![CDATA[rosc2112]]></name></author>
		<updated>2006-12-11T13:50:34-04:00</updated>

		<published>2006-12-11T13:50:34-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=68872#p68872</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=68872#p68872"/>
		<title type="html"><![CDATA[Time problem...]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=68872#p68872"><![CDATA[
I dunno why I didn't think of using [string map]  that would be simpler =)<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7395">rosc2112</a> — Mon Dec 11, 2006 1:50 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2006-12-11T13:20:05-04:00</updated>

		<published>2006-12-11T13:20:05-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=68871#p68871</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=68871#p68871"/>
		<title type="html"><![CDATA[Time problem...]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=68871#p68871"><![CDATA[
Yeah, and that's what you got. $unxtime in this case would be '1161986922'.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Mon Dec 11, 2006 1:20 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Access]]></name></author>
		<updated>2006-12-11T12:47:21-04:00</updated>

		<published>2006-12-11T12:47:21-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=68867#p68867</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=68867#p68867"/>
		<title type="html"><![CDATA[Time problem...]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=68867#p68867"><![CDATA[
???<br><br>do u know what i want?<br><br>i want to convert<br><div class="codebox"><p>Code: </p><pre><code>2006-10-28 00:08:42</code></pre></div>or<div class="codebox"><p>Code: </p><pre><code>1161986922</code></pre></div>to<br><div class="codebox"><p>Code: </p><pre><code>28.10.2006 00:08:42</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7832">Access</a> — Mon Dec 11, 2006 12:47 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[user]]></name></author>
		<updated>2006-12-11T11:38:11-04:00</updated>

		<published>2006-12-11T11:38:11-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=68864#p68864</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=68864#p68864"/>
		<title type="html"><![CDATA[Time problem...]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=68864#p68864"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>clock format $unxtime -format "%d.%m.%Y %T"</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2878">user</a> — Mon Dec 11, 2006 11:38 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Access]]></name></author>
		<updated>2006-12-11T10:26:05-04:00</updated>

		<published>2006-12-11T10:26:05-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=68860#p68860</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=68860#p68860"/>
		<title type="html"><![CDATA[Time problem...]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=68860#p68860"><![CDATA[
<blockquote class="uncited"><div><div class="codebox"><p>Code: </p><pre><code>set timeago [string map {" weeks" w " week" w " days" d " day" d " hours" h " hour" h " minutes" m " minute" m " seconds" s " second" s} $timeago]</code></pre></div></div></blockquote>Works great, thx!<br><br><br>And whats about the <strong class="text-strong">$mytime</strong> variable? anyone an idea to solve this?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7832">Access</a> — Mon Dec 11, 2006 10:26 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[user]]></name></author>
		<updated>2006-12-11T08:15:20-04:00</updated>

		<published>2006-12-11T08:15:20-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=68859#p68859</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=68859#p68859"/>
		<title type="html"><![CDATA[Time problem...]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=68859#p68859"><![CDATA[
<blockquote class="uncited"><div><div class="codebox"><p>Code: </p><pre><code>regexp {([0-9]) week.*? ([0-9]) day.*? ([0-9]) hour.*? ([0-9]) minute.*? ([0-9]) second.*?} $timeago week day hour min sec</code></pre></div></div></blockquote>That pattern requires all units to be present in the string (which will not always be the case..)<br>Try something like this instead:<div class="codebox"><p>Code: </p><pre><code>regsub -all { ([wdhms])[^ ]+} $timeago \\1 timeago</code></pre></div>or<div class="codebox"><p>Code: </p><pre><code>set timeago [string map {" weeks" w " week" w " days" d " day" d " hours" h " hour" h " minutes" m " minute" m " seconds" s " second" s} $timeago]</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2878">user</a> — Mon Dec 11, 2006 8:15 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[rosc2112]]></name></author>
		<updated>2006-12-10T20:00:31-04:00</updated>

		<published>2006-12-10T20:00:31-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=68844#p68844</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=68844#p68844"/>
		<title type="html"><![CDATA[Time problem...]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=68844#p68844"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>set timeago [duration [expr ($now - $unxtime)]] set week "";set day "";set hour ""';set min "";set sec ""regexp {([0-9]) week.*? ([0-9]) day.*? ([0-9]) hour.*? ([0-9]) minute.*? ([0-9]) second.*?} $timeago week day hour min secputchan $chan "mytime $mytime: timeago: $week\w $day\d $hour\h $min\m $sec\s"#antiwordwrap#--------------------------------------------------------------------------------------------------------------</code></pre></div>That's one way.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7395">rosc2112</a> — Sun Dec 10, 2006 8:00 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Access]]></name></author>
		<updated>2006-12-10T19:18:49-04:00</updated>

		<published>2006-12-10T19:18:49-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=68842#p68842</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=68842#p68842"/>
		<title type="html"><![CDATA[Time problem...]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=68842#p68842"><![CDATA[
my code<div class="codebox"><p>Code: </p><pre><code>   set mytime 2006-12-10 21:58:55   set unxtime [clock scan $mytime]   set now [unixtime]    set timeago [duration [expr ($now - $unxtime)]]   putchan  $chan "mytime: $mytime timeago: $timeago</code></pre></div>my output<div class="codebox"><p>Code: </p><pre><code>&lt;eggdrop&gt; mytime 2006-12-10 21:58:55 timeago: 5 weeks 1 day 5 hours 27 minutes 39 seconds</code></pre></div><br>how the code must be look to get following output?<div class="codebox"><p>Code: </p><pre><code>&lt;eggdrop&gt; mytime 10.12.2006 21:58:55 timeago: 5w 1d 5h 27m(in) 39s(ec)</code></pre></div>THX<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7832">Access</a> — Sun Dec 10, 2006 7:18 pm</p><hr />
]]></content>
	</entry>
	</feed>
