summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorKevin B Kenny <kennykb@acm.org>2005-12-05 20:40:42 (GMT)
committerKevin B Kenny <kennykb@acm.org>2005-12-05 20:40:42 (GMT)
commitcc1b97ab4fa3a3af2fc3abecb85ec34fd187fdf2 (patch)
treef9787f87e21679fa4430e3c55d9aa6077066f1a0 /tools
parent72a72bdbda1a618c81ce21298d38a7b66024cf95 (diff)
downloadtcl-cc1b97ab4fa3a3af2fc3abecb85ec34fd187fdf2.zip
tcl-cc1b97ab4fa3a3af2fc3abecb85ec34fd187fdf2.tar.gz
tcl-cc1b97ab4fa3a3af2fc3abecb85ec34fd187fdf2.tar.bz2
adapt tclZIC.tcl to new C API and update to tzdata2005p
Diffstat (limited to 'tools')
-rwxr-xr-xtools/tclZIC.tcl11
1 files changed, 6 insertions, 5 deletions
diff --git a/tools/tclZIC.tcl b/tools/tclZIC.tcl
index 9253686..5fd861f 100755
--- a/tools/tclZIC.tcl
+++ b/tools/tclZIC.tcl
@@ -29,7 +29,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: tclZIC.tcl,v 1.7 2005/11/28 16:28:04 kennykb Exp $
+# RCS: @(#) $Id: tclZIC.tcl,v 1.8 2005/12/05 20:40:42 kennykb Exp $
#
#----------------------------------------------------------------------
@@ -398,7 +398,8 @@ proc parseON {on} {
proc onDayOfMonth {day year month} {
set date [::tcl::clock::GetJulianDayFromEraYearMonthDay \
- [dict create era CE year $year month $month dayOfMonth $day]]
+ [dict create era CE year $year month $month dayOfMonth $day] \
+ 2361222]
return [dict get $date julianDay]
}
@@ -431,7 +432,7 @@ proc onDayOfMonth {day year month} {
proc onWeekdayInMonth {dayOfWeek relation dayOfMonth year month} {
set date [::tcl::clock::GetJulianDayFromEraYearMonthDay [dict create \
- era CE year $year month $month dayOfMonth $dayOfMonth]]
+ era CE year $year month $month dayOfMonth $dayOfMonth] 2361222]
switch -exact -- $relation {
<= {
return [::tcl::clock::WeekdayOnOrBefore $dayOfWeek \
@@ -469,7 +470,7 @@ proc onLastWeekdayInMonth {dayOfWeek year month} {
# Find day 0 of the following month, which is the last day of
# the current month. Yes, it works to ask for day 0 of month 13!
set date [::tcl::clock::GetJulianDayFromEraYearMonthDay [dict create \
- era CE year $year month $month dayOfMonth 0]]
+ era CE year $year month $month dayOfMonth 0] 2361222]
return [::tcl::clock::WeekdayOnOrBefore $dayOfWeek \
[dict get $date julianDay]]
}
@@ -986,7 +987,7 @@ proc applyRules {ruleSet year startSecs stdGMTOffset DSTOffset nextGMTOffset
incr year
set date [::tcl::clock::GetJulianDayFromEraYearMonthDay \
- [dict create era CE year $year month 1 dayOfMonth 1]]
+ [dict create era CE year $year month 1 dayOfMonth 1] 2361222]
set startSecs [expr {
[dict get $date julianDay] * wide(86400) - 210866803200
- $stdGMTOffset - $DSTOffset