summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpatthoyts <patthoyts@users.sourceforge.net>2008-06-24 13:37:26 (GMT)
committerpatthoyts <patthoyts@users.sourceforge.net>2008-06-24 13:37:26 (GMT)
commitb7d36d610814188bb5c669e60f0a6adf1f4452be (patch)
tree523b812e402b00cf9da815618e4c7a8838116ebc
parent1c522063702f7be647b0c23ff52131c118fe3f51 (diff)
downloadtk-b7d36d610814188bb5c669e60f0a6adf1f4452be.zip
tk-b7d36d610814188bb5c669e60f0a6adf1f4452be.tar.gz
tk-b7d36d610814188bb5c669e60f0a6adf1f4452be.tar.bz2
Work around missing timezones (eg: tclkit or some unixes)
-rw-r--r--ChangeLog1
-rw-r--r--library/demos/ttkpane.tcl12
2 files changed, 10 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index ee31d80..b1b89c8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,6 @@
2008-06-24 Pat Thoyts <patthoyts@users.sourceforge.net>
+ * library/demos/ttkpane.tcl: Work around missing timezones
* doc/text.n: bug #1997293 - fix documentation of text tag options.
2008-06-19 Don Porter <dgp@users.sourceforge.net>
diff --git a/library/demos/ttkpane.tcl b/library/demos/ttkpane.tcl
index 549ef3f..a99a845 100644
--- a/library/demos/ttkpane.tcl
+++ b/library/demos/ttkpane.tcl
@@ -2,7 +2,7 @@
#
# This demonstration script creates a Ttk pane with some content.
#
-# RCS: @(#) $Id: ttkpane.tcl,v 1.3 2007/12/13 15:27:07 dgp Exp $
+# RCS: @(#) $Id: ttkpane.tcl,v 1.4 2008/06/24 13:37:32 patthoyts Exp $
if {![info exists widgetDemo]} {
error "This script should be run from the \"widget\" demo."
@@ -53,7 +53,7 @@ proc every {delay script} {
uplevel #0 $script
after $delay [list every $delay $script]
}
-set zones {
+set testzones {
:Europe/Berlin
:America/Argentina/Buenos_Aires
:Africa/Johannesburg
@@ -67,7 +67,13 @@ set zones {
}
# Force a pre-load of all the timezones needed; otherwise can end up
# poor-looking synch problems!
-foreach zone $zones {clock format 0 -timezone $zone}
+set zones {}
+foreach zone $testzones {
+ if {![catch {clock format 0 -timezone $zone}]} {
+ lappend zones $zone
+ }
+}
+if {[llength $zones] < 2} { lappend zones -0200 :GMT :UTC +0200 }
foreach zone $zones {
set city [string map {_ " "} [regexp -inline {[^/]+$} $zone]]
if {$i} {