[squeak-dev] Time zone help
C. David Shaffer
cdshaffer at acm.org
Sat May 30 15:48:14 UTC 2009
David T. Lewis wrote:
>
> Hi David,
>
> For reasons that I do not understand, the New_York zoneinfo file from
> your Gentoo distribution is larger than I expected, and contains additional
> binary data following the time zone table data. My file loader checks
> for this, and throws up the warning that you are seeing. I don't know
> if this is some Gentoo-specific thing, or if there is some alternate
> file format that I am not aware of.
>
>
Thanks for the patch. It is definitely not Gentoo-specific. To make
sure I downloaded the Olson database (Gentoo uses tzdata-2009c currenly,
although I see newer versions). I downloaded tzcode-2009b, compiled the
code, used it to build a zoneinfo database and the New_York file
produced from this is exactly the same as the one I have in my system.
What version of zic are you using? Which data set?
With your patch and the attached patch which I had to add in order to
ignore some time zones that caused other problems. I can't recall which
ones they were but I know I don't need them :-)
After that I did a:
TimeZoneDatabase buildSystemDatabaseForSqueak
Running the tests gives 14 failures most with names that hint at DST
transition issues (testDateAndTimeAtDstTransition,
testDateAndTimeImmediatelyAfter...). Attached is a stack dump for one
of the failed tests in case it provides a clue.
David
-------------- next part --------------
'From Squeak3.9.1 of 2 March 2008 [latest update: #7075] on 30 May 2009 at 11:41 am'!
!TimeZoneDatabase class methodsFor: 'instance creation' stamp: 'cds 5/29/2009 21:49'!
fromFiles: aCollectionOfNames prefixPath: aPathName pathSeparator: aCharacter
"Build a full timezone database from a set of tzfile files. The path names have
aPathName prepended in order to permit the names (without aPathName) to be
used as the names of the TimeZoneRuleSets. Attempt to save space by avoiding
duplicate entries for leap second rules and time zone offset rule sets.
The path separator (aCharacter) is always replaced by self>>indexSeparator for
purposes of naming the time zones in the database. This enforces a consistent
time zone path name independent of the system platform."
"TimeZoneDatabase fromFiles: TimeZoneDatabase exampleTzFiles prefixPath: TimeZoneDatabase tzExamplesPrefixPath pathSeparator: $- "
| db idx |
db := super new.
idx := 0.
self showProgressFrom: 1 to: aCollectionOfNames size withMessage: 'loading timezone data files'
forBlock: [ :bar |
aCollectionOfNames do: [:e |
[idx := idx + 1.
bar value: idx.
db loadDataFrom: e
prefixPath: aPathName
pathSeparator: aCharacter
condenseDuplicates: false] on: Error do: [:ex | ]]].
^ db normalize
! !
-------------- next part --------------
TestFailure: Assertion failed
30 May 2009 11:43:47 am
VM: unix - a SmalltalkImage
Image: Squeak3.9.1 [latest update: #7075]
SecurityManager state:
Restricted: false
FileAccess: true
SocketAccess: true
Working Dir /home/shaffer/Source/Squeak/ProfitPortal
Trusted Dir /home/shaffer/Source/Squeak/ProfitPortal/secure
Untrusted Dir /home/shaffer/Source/Squeak/ProfitPortal/My Squeak
TimeTransformTest(TestCase)>>signalFailure:
Receiver: TimeTransformTest>>#testAbsoluteTimeToDateAndTimeSeconds {testing-PointInTime seconds}
Arguments and temporary variables:
aString: 'Assertion failed'
Receiver's instance variables:
testSelector: #testAbsoluteTimeToDateAndTimeSeconds
saveLocalTimeZone: a TimeZone(EDT)
saveLocalTransform: a TimeZoneRuleSet for UTC
saveLastTransitionTime: nil
dstTransitionAbsoluteSeconds: 1099202422
dstTransitionPosixSeconds: 1099202400
leapSeconds: 22
TimeTransformTest(TestCase)>>assert:
Receiver: TimeTransformTest>>#testAbsoluteTimeToDateAndTimeSeconds {testing-PointInTime seconds}
Arguments and temporary variables:
aBooleanOrBlock: false
Receiver's instance variables:
testSelector: #testAbsoluteTimeToDateAndTimeSeconds
saveLocalTimeZone: a TimeZone(EDT)
saveLocalTransform: a TimeZoneRuleSet for UTC
saveLastTransitionTime: nil
dstTransitionAbsoluteSeconds: 1099202422
dstTransitionPosixSeconds: 1099202400
leapSeconds: 22
TimeTransformTest>>testAbsoluteTimeToDateAndTimeSeconds
Receiver: TimeTransformTest>>#testAbsoluteTimeToDateAndTimeSeconds {testing-PointInTime seconds}
Arguments and temporary variables:
interval: (1099202420 to: 1099202423)
expectedLocalSmalltalkSeconds: #(3276640798 3276640799 3276637200 3276637201)
dateAndTimes: an Array(2004-10-31T01:59:58-04:00 2004-10-31T01:59:59-04:00 2004...etc...
dateAndTimeSeconds: #(3276640798 3276640799 3276640800 3276640801)
abs: 1099202423
dt: 2004-10-31T01:00:01-05:00
Receiver's instance variables:
testSelector: #testAbsoluteTimeToDateAndTimeSeconds
saveLocalTimeZone: a TimeZone(EDT)
saveLocalTransform: a TimeZoneRuleSet for UTC
saveLastTransitionTime: nil
dstTransitionAbsoluteSeconds: 1099202422
dstTransitionPosixSeconds: 1099202400
leapSeconds: 22
TimeTransformTest(TestCase)>>performTest
Receiver: TimeTransformTest>>#testAbsoluteTimeToDateAndTimeSeconds {testing-PointInTime seconds}
Arguments and temporary variables:
Receiver's instance variables:
testSelector: #testAbsoluteTimeToDateAndTimeSeconds
saveLocalTimeZone: a TimeZone(EDT)
saveLocalTransform: a TimeZoneRuleSet for UTC
saveLastTransitionTime: nil
dstTransitionAbsoluteSeconds: 1099202422
dstTransitionPosixSeconds: 1099202400
leapSeconds: 22
--- The full stack ---
TimeTransformTest(TestCase)>>signalFailure:
TimeTransformTest(TestCase)>>assert:
TimeTransformTest>>testAbsoluteTimeToDateAndTimeSeconds
TimeTransformTest(TestCase)>>performTest
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
[] in TimeTransformTest(TestCase)>>runCase {[self setUp. self performTest]}
BlockContext>>ensure:
[] in TimeTransformTest(TestCase)>>runCase {[[self setUp. self performTest] ensure: [self tearDown]]}
TimeTransformTest(TestCase)>>runCaseWith:
TimeTransformTest(TestCase)>>runCase
[] in TimeTransformTest(TestCase)>>debug {[(self class selector: testSelector) runCase]}
BlockContext>>on:do:
[] in TimeTransformTest(TestCase)>>debug {[[(self class selector: testSelector) runCase] on: Error do: [:ex | Unha...]}
BlockContext>>ensure:
TimeTransformTest(TestCase)>>debug
[] in TestRunner>>debugSuite: {[:each | each debug]}
Set>>do:
[] in TestRunner>>basicRunSuite:do: {[aTestSuite name isEmptyOrNil ifTrue: [aTestSuite tests do: aBlock] ifFa...]}
BlockContext>>ensure:
TestRunner>>basicRunSuite:do:
TestRunner>>debugSuite:
TestRunner>>debug:
TestRunner>>failedSelected:
PluggableListMorphPlus(PluggableListMorph)>>changeModelSelection:
PluggableListMorphPlus(PluggableListMorph)>>mouseUp:
PluggableListMorphPlus(Morph)>>handleMouseUp:
MouseButtonEvent>>sentTo:
PluggableListMorphPlus(Morph)>>handleEvent:
PluggableListMorphPlus(Morph)>>handleFocusEvent:
[] in HandMorph>>sendFocusEvent:to:clear: {[ActiveHand := self. ActiveEvent := anEvent. e := anEvent transformedB...]}
[] in PasteUpMorph>>becomeActiveDuring: {[aBlock value]}
BlockContext>>on:do:
PasteUpMorph>>becomeActiveDuring:
...etc...
More information about the Squeak-dev
mailing list
|