egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

calculating days
Goto page Previous  1, 2
 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
user
 


Joined: 18 Mar 2003
Posts: 1452
Location: Norway

PostPosted: Tue Oct 09, 2007 4:57 am    Post subject: Reply with quote

iamdeath wrote:
Time registered: Mar 07 21:22:37 2006 EST

If the format is like that, should'nt it work?

Yes ( http://tcl.tk/man/tcl8.4/TclCmd/clock.htm#M45 )
_________________
Have you ever read "The Manual"?
Back to top
View user's profile Send private message
iamdeath
Master


Joined: 11 Feb 2005
Posts: 323
Location: *HeLL*

PostPosted: Tue Oct 09, 2007 5:21 am    Post subject: Reply with quote

user wrote:
iamdeath wrote:
Time registered: Mar 07 21:22:37 2006 EST

If the format is like that, should'nt it work?

Yes ( http://tcl.tk/man/tcl8.4/TclCmd/clock.htm#M45 )


Thanks alot but I did'nt get that.. Can you please be more specific

Thanks
_________________
|AmDeAtH @ Undernet


Death is only the *Beginning*...
Back to top
View user's profile Send private message Visit poster's website
nml375
Revered One


Joined: 04 Aug 2006
Posts: 2857

PostPosted: Tue Oct 09, 2007 5:36 am    Post subject: Reply with quote

Keep in mind that lrange returns a list, not a string..
Might want to join it into a string before trying to scan it.
Code:
set then [clock scan [join [lrange [split $text] 3 end]]]


The timestamp you mentioned should work just fine with "clock scan":
Code:
[11:31] > .tcl clock scan "Mar 07 21:22:37 2006 EST"
[11:31] < Tcl: 1141784557

_________________
NML_375, idling at #eggdrop@IrcNET
Back to top
View user's profile Send private message
iamdeath
Master


Joined: 11 Feb 2005
Posts: 323
Location: *HeLL*

PostPosted: Tue Oct 09, 2007 10:29 am    Post subject: Reply with quote

Thanks alot nml Smile

The problem was coming because I was using lrange 3 end when 2 end was needed Very Happy

Thanks alot soo much, you guys rock.
iamdeath
_________________
|AmDeAtH @ Undernet


Death is only the *Beginning*...
Back to top
View user's profile Send private message Visit poster's website
rosc2112
Revered One


Joined: 19 Feb 2006
Posts: 1454
Location: Northeast Pennsylvania

PostPosted: Tue Oct 09, 2007 2:32 pm    Post subject: Reply with quote

Clock scan is picky about the format you give it, the manpage doesn't say it but the commas shown in the example formats are necessary. EG: day, dd monthname yy or monthname dd ?, yy?

There's a little more detail here:
http://forum.egghelp.org/viewtopic.php?p=67017#67017
Back to top
View user's profile Send private message
iamdeath
Master


Joined: 11 Feb 2005
Posts: 323
Location: *HeLL*

PostPosted: Wed Oct 10, 2007 12:49 am    Post subject: Reply with quote

Thanks alot rosc, that helps much.
Thanks once again
iamdeath
_________________
|AmDeAtH @ Undernet


Death is only the *Beginning*...
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help All times are GMT - 4 Hours
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber