Error processing request
Parameters
CONTENT_LENGTH | 0 |
REQUEST_METHOD | GET |
REQUEST_URI | /revision/ClockDemo?V=0 |
QUERY_STRING | V=0 |
CONTENT_TYPE | |
DOCUMENT_URI | /revision/ClockDemo |
DOCUMENT_ROOT | /var/www/nikit/nikit/nginx/../docroot |
SCGI | 1 |
SERVER_PROTOCOL | HTTP/1.1 |
HTTPS | on |
REMOTE_ADDR | 172.70.178.154 |
REMOTE_PORT | 59926 |
SERVER_PORT | 4443 |
SERVER_NAME | wiki.tcl-lang.org |
HTTP_HOST | wiki.tcl-lang.org |
HTTP_CONNECTION | Keep-Alive |
HTTP_ACCEPT_ENCODING | gzip, br |
HTTP_X_FORWARDED_FOR | 3.21.97.21 |
HTTP_CF_RAY | 88d311a42fc8025a-ORD |
HTTP_X_FORWARDED_PROTO | https |
HTTP_CF_VISITOR | {"scheme":"https"} |
HTTP_ACCEPT | */* |
HTTP_USER_AGENT | Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; [email protected]) |
HTTP_REFERER | https://wiki.tcl.tk/revision/ClockDemo?V=0 |
HTTP_CF_CONNECTING_IP | 3.21.97.21 |
HTTP_CDN_LOOP | cloudflare |
HTTP_CF_IPCOUNTRY | US |
Body
Error
Unknow state transition: LINE -> END
-code
1
-level
0
-errorstack
INNER {returnImm {Unknow state transition: LINE -> END} {}} CALL {my render_wikit ClockDemo {
if 0 {
**General Notes**
A demo for all the format groups recognized by the clock scan and clock format commands.
References to programs and pages here :
* WorldtimeClock - http://wiki.tcl.tk/14375
* clock scan - http://wiki.tcl.tk/2525
**Designers notes**
* ..
**Notes about working with tcl**
* As I already ranted, the Doku/Help has not enough useful examples.<<br>>So, this demo is how such an example-program could look like, with almost everything copied/pasted directly from "Tcl/Tk Documentation > TclCmd > clock".
**Program**
----
}
#======tcl
# ClockDemo04.tcl - Mike Hase - 2015-03-03
# http://wiki.tcl.tk/41210
set Prog(title) "ClockDemo"
set Prog(version) "v0.04"
set Prog(date) "2015-03-03"
### clock format-codes:
# Code Type: Description
array set fTab {
%a "Wd: Day of the week, abbreviation, localized"
%A "Wd: Day of the week, full name, localized"
%b "Dm: Name of the month, abbreviation, localized"
%B "Dm: Name of the month, full name, localized"
%c "TD: Date and time of day, localized"
%C "Dy: Century, Indo-Arabic numerals"
%d "Dm: Number of the day of the month, two decimal digits"
%D "D_: Date, as in %m/%d/%Y"
%e "Dd: Number of the day of the month, one (with a leading blank) or two decimal digits"
%g "Dy: Two-digit year number, for use with the week-based ISO8601 calendar"
%G "Dy: Four-digit year number for use with the week-based ISO8601 calendar"
%h "Dm: Name of the month, as in %b"
%H "Th: Hour of the day (00-23), on a 24-hour clock."
%I "Th: Hour of the day (12-11), on a 12-hour clock."
%j "Dd: Day of the year (001-366), three-digits"
%J "D_: Julian Day Number, since 1 January, 4713 BCE."
%k "Th: Hour of the day (00-23), one- or two-digits, 24-hour clock."
%l "Th: Hour of the day (12-11), one- or two-digits, 12-hour clock."
%m "Dm: Number of the month (01-12) with two digits"
%M "Tm: Number of the minute of the hour (00-59) with two digits."
%N "Dm: Number of the month (1-12) one (with a leading blank) or two digits"
%p "D_: Part of the day, AM or PM, localized"
%P "D_: Part of the day, am or pm, localized"
%Q "X_: (internal use:)"
%r "T_: Time of the day, on a 12-hour clock, localized"
%R "T_: Time of the day, on a 24-hour clock, localized"
%s "T_: Clockseconds as decimal integer"
%S "Ts: Second of the minute (00-59)."
%T "T_: Time, as in %H:%M:%S."
%u "Wd: Number of the day of the week (1=Monday, 7=Sunday)"
%U "Dw: Ordinal number of the week of the year (00-53). (obsolete)"
%V "Dw: Number of the ISO8601 week as a two digit number (01-53)."
%w "Wd: Day of the week, ordinal number (Sunday=0; Saturday=6)."
%W "Dw: Week number (00-53) within the year"
%x "D_: Date, localized"
%X "T_: Time, localized"
%y "Dy: Year, two digits (1938-2037)"
%Y "Dy: Year, four digits (1938-2037)"
%z "Z_: Timezone, in hours and minutes east (+hhmm) or west (-hhmm) of Greenwich."
%Z "Z_: Timezone as name, localized"
%+ "TD: TimeDate, as in %a %b %e %H:%M:%S %Z %Y"
}
### Display:
proc show0 {} {
global cs td
set td [clock format $cs -format "%Y-%m-%d %H:%M:%S" ]
puts "--"
puts "clock seconds: $cs TimeDate: $td"
}
proc show1 {} {
global cs td fTab
puts "\nAll codes, unsorted:"
foreach {fc descr} [array get fTab] {
set res [clock format $cs -format $fc ]
puts [format "%-3s %-28s %s" $fc $res $descr]
}
}
proc show2 { select title } {
global cs td fTab
puts "\n$title:"
set res "xx"
set i 0
foreach fc [lsort -dict [array names fTab] ] {
incr i 1
set descr $fTab($fc)
set type [string range $descr 0 0]
set desc1 [string range $descr 4 end]
if {$type == $select} {
set res [clock format $cs -format $fc ]
puts [format "%-3s %-28s %s" $fc $res $desc1]
}
}
}
### Time:
proc now {} {
global cs td fTab
set cs [clock seconds]
set td [clock format $cs -format "%Y-%m-%d %H:%M:%S" ]
}
### Time/Repeat/Wait:
proc every {ms body} {
if 1 $body
after $ms [list after idle [info level 0]]
}
proc run {} {every 10000 {now; u} }
proc stop {} {foreach id [after info] {after cancel $id}; }
### Test+Debug:
proc ? {} { help }
proc help {} {
puts "argv0 : $::argv0"
puts "argv : $::argv"
puts "tcl/tk: $::tcl_patchLevel / $::tk_patchLevel"
puts "now,t:change time, x,y, show0,show1, e:exit"
}
proc t {} { set ::cs [clock scan {1987-12-31 13:14:15} -format {%Y-%m-%d %H:%M:%S}] }
proc x {} { show0; show1 }
proc y {} {
show0
show2 "D" "Formatting codes for date"
show2 "T" "Formatting codes for time"
}
proc e {} { exit }
### Main:
wm title . "$Prog(title) $Prog(version)"
puts "$Prog(title) $Prog(version)"
bind . <F2> { console show }
catch {console show} ;##
catch {wm withdraw .}
t
#now
show0
#show1
show2 "D" "Formatting codes for date"
show2 "T" "Formatting codes for time"
### EOF ###
======
----
**Remarks**
if 0 {
[MiHa] 2015-03-03 - It looks like there is no formatting code for the total minutes of the day (0-1440). <<br>> Same for seconds (0-86400).
Also, is there an easy way to format long strings to fit into table-columns ?
}
<<categories>>Date and Time} regexp2} CALL {my render ClockDemo {
if 0 {
**General Notes**
A demo for all the format groups recognized by the clock scan and clock format commands.
References to programs and pages here :
* WorldtimeClock - http://wiki.tcl.tk/14375
* clock scan - http://wiki.tcl.tk/2525
**Designers notes**
* ..
**Notes about working with tcl**
* As I already ranted, the Doku/Help has not enough useful examples.<<br>>So, this demo is how such an example-program could look like, with almost everything copied/pasted directly from "Tcl/Tk Documentation > TclCmd > clock".
**Program**
----
}
#======tcl
# ClockDemo04.tcl - Mike Hase - 2015-03-03
# http://wiki.tcl.tk/41210
set Prog(title) "ClockDemo"
set Prog(version) "v0.04"
set Prog(date) "2015-03-03"
### clock format-codes:
# Code Type: Description
array set fTab {
%a "Wd: Day of the week, abbreviation, localized"
%A "Wd: Day of the week, full name, localized"
%b "Dm: Name of the month, abbreviation, localized"
%B "Dm: Name of the month, full name, localized"
%c "TD: Date and time of day, localized"
%C "Dy: Century, Indo-Arabic numerals"
%d "Dm: Number of the day of the month, two decimal digits"
%D "D_: Date, as in %m/%d/%Y"
%e "Dd: Number of the day of the month, one (with a leading blank) or two decimal digits"
%g "Dy: Two-digit year number, for use with the week-based ISO8601 calendar"
%G "Dy: Four-digit year number for use with the week-based ISO8601 calendar"
%h "Dm: Name of the month, as in %b"
%H "Th: Hour of the day (00-23), on a 24-hour clock."
%I "Th: Hour of the day (12-11), on a 12-hour clock."
%j "Dd: Day of the year (001-366), three-digits"
%J "D_: Julian Day Number, since 1 January, 4713 BCE."
%k "Th: Hour of the day (00-23), one- or two-digits, 24-hour clock."
%l "Th: Hour of the day (12-11), one- or two-digits, 12-hour clock."
%m "Dm: Number of the month (01-12) with two digits"
%M "Tm: Number of the minute of the hour (00-59) with two digits."
%N "Dm: Number of the month (1-12) one (with a leading blank) or two digits"
%p "D_: Part of the day, AM or PM, localized"
%P "D_: Part of the day, am or pm, localized"
%Q "X_: (internal use:)"
%r "T_: Time of the day, on a 12-hour clock, localized"
%R "T_: Time of the day, on a 24-hour clock, localized"
%s "T_: Clockseconds as decimal integer"
%S "Ts: Second of the minute (00-59)."
%T "T_: Time, as in %H:%M:%S."
%u "Wd: Number of the day of the week (1=Monday, 7=Sunday)"
%U "Dw: Ordinal number of the week of the year (00-53). (obsolete)"
%V "Dw: Number of the ISO8601 week as a two digit number (01-53)."
%w "Wd: Day of the week, ordinal number (Sunday=0; Saturday=6)."
%W "Dw: Week number (00-53) within the year"
%x "D_: Date, localized"
%X "T_: Time, localized"
%y "Dy: Year, two digits (1938-2037)"
%Y "Dy: Year, four digits (1938-2037)"
%z "Z_: Timezone, in hours and minutes east (+hhmm) or west (-hhmm) of Greenwich."
%Z "Z_: Timezone as name, localized"
%+ "TD: TimeDate, as in %a %b %e %H:%M:%S %Z %Y"
}
### Display:
proc show0 {} {
global cs td
set td [clock format $cs -format "%Y-%m-%d %H:%M:%S" ]
puts "--"
puts "clock seconds: $cs TimeDate: $td"
}
proc show1 {} {
global cs td fTab
puts "\nAll codes, unsorted:"
foreach {fc descr} [array get fTab] {
set res [clock format $cs -format $fc ]
puts [format "%-3s %-28s %s" $fc $res $descr]
}
}
proc show2 { select title } {
global cs td fTab
puts "\n$title:"
set res "xx"
set i 0
foreach fc [lsort -dict [array names fTab] ] {
incr i 1
set descr $fTab($fc)
set type [string range $descr 0 0]
set desc1 [string range $descr 4 end]
if {$type == $select} {
set res [clock format $cs -format $fc ]
puts [format "%-3s %-28s %s" $fc $res $desc1]
}
}
}
### Time:
proc now {} {
global cs td fTab
set cs [clock seconds]
set td [clock format $cs -format "%Y-%m-%d %H:%M:%S" ]
}
### Time/Repeat/Wait:
proc every {ms body} {
if 1 $body
after $ms [list after idle [info level 0]]
}
proc run {} {every 10000 {now; u} }
proc stop {} {foreach id [after info] {after cancel $id}; }
### Test+Debug:
proc ? {} { help }
proc help {} {
puts "argv0 : $::argv0"
puts "argv : $::argv"
puts "tcl/tk: $::tcl_patchLevel / $::tk_patchLevel"
puts "now,t:change time, x,y, show0,show1, e:exit"
}
proc t {} { set ::cs [clock scan {1987-12-31 13:14:15} -format {%Y-%m-%d %H:%M:%S}] }
proc x {} { show0; show1 }
proc y {} {
show0
show2 "D" "Formatting codes for date"
show2 "T" "Formatting codes for time"
}
proc e {} { exit }
### Main:
wm title . "$Prog(title) $Prog(version)"
puts "$Prog(title) $Prog(version)"
bind . <F2> { console show }
catch {console show} ;##
catch {wm withdraw .}
t
#now
show0
#show1
show2 "D" "Formatting codes for date"
show2 "T" "Formatting codes for time"
### EOF ###
======
----
**Remarks**
if 0 {
[MiHa] 2015-03-03 - It looks like there is no formatting code for the total minutes of the day (0-1440). <<br>> Same for seconds (0-86400).
Also, is there an easy way to format long strings to fit into table-columns ?
}
<<categories>>Date and Time}} CALL {my revision ClockDemo} CALL {::oo::Obj763504 process revision/ClockDemo} CALL {::oo::Obj763502 process}
-errorcode
NONE
-errorinfo
Unknow state transition: LINE -> END
while executing
"error $msg"
(class "::Wiki" method "render_wikit" line 6)
invoked from within
"my render_$default_markup $N $C $mkup_rendering_engine"
(class "::Wiki" method "render" line 8)
invoked from within
"my render $name $C"
(class "::Wiki" method "revision" line 31)
invoked from within
"my revision $page"
(class "::Wiki" method "process" line 56)
invoked from within
"$server process [string trim $uri /]"
-errorline
4