This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

clock scan unable to convert date-time string

Old posts that have not been replied to for several years.
Locked
User avatar
LorT
Voice
Posts: 15
Joined: Sun Mar 09, 2003 6:11 pm

clock scan unable to convert date-time string

Post by LorT »

hi, i have this code

Code: Select all

set infos [string range $buf 5 [expr [string first ")" $buf] -1]]
set infos [clock scan " [string range $infos 12 13] [string range $infos 9 10] [string range $infos 6 7] [string range $infos 0 1] [string range $infos 3 4] 00"]
.addmatch date(18:00-15/04/04)
the bot return Tcl error [team:addmatch]: unable to convert date-time string " 04 04 05 18 00 00"
User avatar
strikelight
Owner
Posts: 708
Joined: Mon Oct 07, 2002 10:39 am
Contact:

Post by strikelight »

Just as the error implies... "04 04 05 18 00 00" is not a valid date/time format, so It can not be converted....
User avatar
LorT
Voice
Posts: 15
Joined: Sun Mar 09, 2003 6:11 pm

Post by LorT »

ok, what can It converte date(18:00-15/04/04) to valid date/time format?

thks.
User avatar
strikelight
Owner
Posts: 708
Joined: Mon Oct 07, 2002 10:39 am
Contact:

Post by strikelight »

From the clock scan manual page entry:
The dateString consists of zero or more specifications of the following form:



time
A time of day, which is of the form: hh?:mm?:ss?? ?meridian? ?zone? or hhmm ?meridian? ?zone?. If no meridian is specified, hh is interpreted on a 24-hour clock.

date
A specific month and day with optional year. The acceptable formats are mm/dd?/yy?, monthname dd ?, yy?, dd monthname ?yy?, day, dd monthname yy, ?CC?yymmdd, ?CC?yy-mm-dd, dd-monthname-?CC?yy. The default year is the current year. If the year is less than 100, we treat the years 00-68 as 2000-2068 and the years 69-99 as 1969-1999. Not all platforms can represent the years 38-70, so an error may result if these years are used.
Locked