| View previous topic :: View next topic |
| Author |
Message |
user

Joined: 18 Mar 2003 Posts: 1452 Location: Norway
|
Posted: Tue Oct 09, 2007 4:57 am Post subject: |
|
|
| 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 |
|
 |
iamdeath Master

Joined: 11 Feb 2005 Posts: 323 Location: *HeLL*
|
Posted: Tue Oct 09, 2007 5:21 am Post subject: |
|
|
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 |
|
 |
nml375 Revered One
Joined: 04 Aug 2006 Posts: 2857
|
Posted: Tue Oct 09, 2007 5:36 am Post subject: |
|
|
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 |
|
 |
iamdeath Master

Joined: 11 Feb 2005 Posts: 323 Location: *HeLL*
|
Posted: Tue Oct 09, 2007 10:29 am Post subject: |
|
|
Thanks alot nml
The problem was coming because I was using lrange 3 end when 2 end was needed
Thanks alot soo much, you guys rock.
iamdeath _________________ |AmDeAtH @ Undernet
Death is only the *Beginning*... |
|
| Back to top |
|
 |
rosc2112 Revered One

Joined: 19 Feb 2006 Posts: 1454 Location: Northeast Pennsylvania
|
Posted: Tue Oct 09, 2007 2:32 pm Post subject: |
|
|
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 |
|
 |
iamdeath Master

Joined: 11 Feb 2005 Posts: 323 Location: *HeLL*
|
Posted: Wed Oct 10, 2007 12:49 am Post subject: |
|
|
Thanks alot rosc, that helps much.
Thanks once again
iamdeath _________________ |AmDeAtH @ Undernet
Death is only the *Beginning*... |
|
| Back to top |
|
 |
|