Marcel Taeumel uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-mt.2115.mcz
==================== Summary ====================
Name: Morphic-mt.2115
Author: mt
Time: 26 July 2023, 10:36:29.942063 am
UUID: ccd8c476-cfcb-0d43-9575-06f073de445f
Ancestors: Morphic-mt.2114
Prepare contents restoring for tools that need it.
=============== Diff against Morphic-mt.2114 ===============
Item was changed:
----- Method: MorphicProject>>startUpActions (in category 'enter') -----
startUpActions
super startUpActions.
self world install.
self world firstHand position: 100@100.
"April 2022: None of the currently supported graphics backends on macOS (i.e., -metal -core-graphics, -opengl) in the OSVM supports an extra display buffer at the VM side, which may result in flickering during compositing or an expensive (over-)committing at vsync boundaries. Thus, use an image-side buffer for compositing to mitigate (or avoid) these issues."
+ WorldState disableDeferredUpdates: Smalltalk platformName = 'Mac OS'.
+
+ "Refresh tools that depend on host contents."
+ self flag: #discuss. "mt: Is this the right place?"
+ self world submorphsDo: [:m | | workspace |
+ (m isSystemWindow and: [(workspace := m model) respondsTo: #restoreContentsFromFile])
+ ifTrue: [workspace restoreContentsFromFile]].!
- WorldState disableDeferredUpdates: Smalltalk platformName = 'Mac OS'.!
Marcel Taeumel uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-mt.1417.mcz
==================== Summary ====================
Name: System-mt.1417
Author: mt
Time: 26 July 2023, 9:39:35.033749 am
UUID: 961993bf-e6a1-b147-afc0-ec59d15b817c
Ancestors: System-mt.1416
In "there are no" dialog infos, remove unnecessary line break but rely on normal text layouting. Looks strange for longer symbols (senders/implementors) otherwise.
=============== Diff against System-mt.1416 ===============
Item was changed:
----- Method: SystemNavigation>>browseMessageList:name:autoSelect: (in category 'browse') -----
browseMessageList: messageListOrBlock name: labelString autoSelect: autoSelectString
"Create and schedule a MessageSet browser on the message list. If messageListOrBlock is a block, then evaluate it to get the message list."
| messageList |
messageList := messageListOrBlock isBlock
ifTrue: [ Cursor wait showWhile: messageListOrBlock ]
ifFalse: [ messageListOrBlock ].
messageList size = 0 ifTrue: [
+ ^self inform: 'There are no ', labelString ].
- ^self inform: 'There are no', String cr, labelString ].
^ ToolSet
browseMessageSet: messageList
name: labelString
autoSelect: autoSelectString!
Marcel Taeumel uploaded a new version of Chronology-Core to project The Trunk:
http://source.squeak.org/trunk/Chronology-Core-mt.87.mcz
==================== Summary ====================
Name: Chronology-Core-mt.87
Author: mt
Time: 25 July 2023, 10:29:46.67268 am
UUID: 76a3f1ce-b428-8e44-8317-f80bc70eba42
Ancestors: Chronology-Core-dtl.86
Revise #nanosecondsToRunHighRes: to be somewhat useful:
- Convert ticks-to-nanos for each block run, not constant per session anymore
- Let a block run for at least 10 milliseconds to reliably convert ticks to time.
- Sanity check for core switch by checking monotonicity of value.
Time nanosecondsToRunHighRes: [Morph new].
Note that most results (even for 'Object new') seem to be microseconds at best. No nano-precision. See #microsecondsToRun: and #useHighResClockForTiming.
[Object new] bench.
" '65,400,000 per second. 15.3 nanoseconds per run. 38.29234 % GC time.' "
10 timesCollect: [Time nanosecondsToRunHighRes: [Object new]]
" #(7914 1948 862 321 135 231 312 464 240 402) "
At least that high-res clock will not distort #timeToRun values (milliseconds) anymore:
Time useHighResClockForTiming: false.
5 timesCollect: [[Project current world imageForm] timeToRun].
"#(241 224 248 226 222) "
Time useHighResClockForTiming: true.
5 timesCollect: [[Project current world imageForm] timeToRun].
" #(229 215 220 224 225) "
=============== Diff against Chronology-Core-dtl.86 ===============
Item was changed:
Magnitude subclass: #Time
instanceVariableNames: 'seconds nanos'
+ classVariableNames: 'ClockPolicy LastClockTick UpdateVMTimeZoneCacheAt UseHighResClockForTiming'
- classVariableNames: 'ClockPolicy HighResClockTicksPerMillisecond LastClockTick UpdateVMTimeZoneCacheAt UseHighResClockForTiming'
poolDictionaries: 'ChronologyConstants'
category: 'Chronology-Core'!
!Time commentStamp: 'dew 10/23/2004 17:58' prior: 0!
This represents a particular point in time during any given day. For example, '5:19:45 pm'.
If you need a point in time on a particular day, use DateAndTime. If you need a duration of time, use Duration.
!
Item was removed:
- ----- Method: Time class>>highResClockTicksPerMillisecond (in category 'clock') -----
- highResClockTicksPerMillisecond
- HighResClockTicksPerMillisecond = 0
- ifTrue:
- [HighResClockTicksPerMillisecond := self estimateHighResClockTicksPerMillisecond].
- ^HighResClockTicksPerMillisecond!
Item was changed:
----- Method: Time class>>initialize (in category 'class initialization') -----
initialize
" self initialize "
LastClockTick ifNil: [ LastClockTick := 0 ].
- HighResClockTicksPerMillisecond ifNil: [ HighResClockTicksPerMillisecond := 0 ].
-
ClockPolicy ifNil: [
"self clockPolicy: #acceptPlatformTime."
self clockPolicy: #monotonicAllowDuplicates.
"self clockPolicy: #monotonicForceMicrosecondIncrement."
"self clockPolicy: #monotonicForceNanosecondIncrement." ]!
Item was changed:
----- Method: Time class>>nanosecondsToRun: (in category 'general inquiries') -----
nanosecondsToRun: timedBlock
"Answer the number of nanoseconds timedBlock takes to return its value.
Use high resolution clock if available and preferred."
| startUsecs |
(self useHighResClockForTiming and: [self highResClock ~= 0])
+ ifTrue: [^ (self nanosecondsToRunHighRes: timedBlock)].
- ifTrue: [ ^(self nanosecondsToRunHighRes: timedBlock)].
"Fallback to microseconds clock"
startUsecs := self utcMicrosecondClock.
timedBlock value.
^self utcMicrosecondClock - startUsecs * 1000!
Item was changed:
----- Method: Time class>>nanosecondsToRunHighRes: (in category 'general inquiries') -----
nanosecondsToRunHighRes: timedBlock
"Answer the number of nanoseconds timedBlock takes to return its value using high resolution clock.
+ This assumes that high resolution clock is available, has a somewhat constant rate, and is synchronized between multi-core CPU. Let the timer run at least 10 milliseconds to convert ticks to nanoseconds more reliably."
- This assumes that high resolution clock is available, has a constant rate, and is synchronized between multi-core CPU"
+ | start ticks1 ticks2 ticks3 delta overhead |
+ ticks1 := self highResClock.
+ start := self utcMicrosecondClock.
- | ticks |
- ticks := self highResClock.
timedBlock value.
+ ticks2 := self highResClock.
+ [(delta := self utcMicrosecondClock - start) < 10000 "10 ms"] whileTrue.
+ ticks3 := self highResClock.
+ overhead := (self highResClock - self highResClock) negated.
+ (ticks1 < ticks2 and: [ticks2 < ticks3] and: [overhead > 0]) ifFalse: [
+ "Try again. We probably switched cores by accident."
+ ^ self nanosecondsToRunHighRes: timedBlock].
+ ^ (ticks2 - ticks1
+ - overhead "subtract the ticks taken by the call to highResClock itself"
+ * 1e3 // (ticks3 - ticks1 // delta)) "and convert ticks to nanoSeconds"!
- ^(self highResClock - ticks
- + (self highResClock - self highResClock ) "subtract the ticks taken by the call to highResClock itself"
- * 1e6 // self highResClockTicksPerMillisecond) "and convert ticks to nanoSeconds"!
Item was changed:
----- Method: Time class>>startUp: (in category 'system startup') -----
startUp: resuming
+ resuming ifTrue: [LastClockTick := 0]!
- resuming ifTrue: [
- LastClockTick := 0.
- HighResClockTicksPerMillisecond := 0 ]!
Item was changed:
----- Method: Time class>>useHighResClockForTiming (in category 'preferences') -----
useHighResClockForTiming
+ <preference: 'Use high-resolution clock for timing'
- <preference: 'Use high resolution clock for timing'
category: 'performance'
+ description: 'This is used for measuring time ellapsed for running a block. High-resolution clocks (known as TSC) are counter embedded on CPU and incremented at each cycle. They enable timing close to the nanosecond for GHz CPU. However, on older models, they might have a non constant rate depending on power saving: converting ticks to seconds is not reliable in this case, but knowing the number of cycles taken to perform the task is still a valuable information. TSC might also be un-synchronized between the multi-cores: if Squeak process is switched from 1 core to another during the timing, timing results could be random. If you have a recent CPU, you might prefer this option'
- description: 'This is used for measuring time ellapsed for running a block. High resolution clocks (known as TSC) are counter embedded on CPU and incremented at each cycle. They enable timing close to the nanosecond for GHz CPU. However, on older models, they might have a non constant rate depending on power saving: converting ticks to seconds is not reliable in this case, but knowing the number of cycles taken to perform the task is still a valuable information. TSC might also be un-synchronized between the multi-cores: if Squeak process is switched from 1 core to another during the timing, timing results could be random. If you have a recent CPU, you might prefer this option'
type: #Boolean>
^UseHighResClockForTiming ifNil: [ false ]!
David T. Lewis uploaded a new version of 61Deprecated to project The Trunk:
http://source.squeak.org/trunk/61Deprecated-dtl.8.mcz
==================== Summary ====================
Name: 61Deprecated-dtl.8
Author: dtl
Time: 9 July 2023, 11:22:20.267235 pm
UUID: a299b66c-01de-49f5-86d7-a5756df899b5
Ancestors: 61Deprecated-ct.7
Deprecate SequenceableCollection>>checkedAt: which is no longer referenced in the image and has been functionally redundant for many years. SequenceableCollection>>at: provides equivalent bounds checking.
=============== Diff against 61Deprecated-ct.7 ===============
Item was added:
+ ----- Method: SequenceableCollection>>checkedAt: (in category '*61Deprecated-Collections') -----
+ checkedAt: index
+ self deprecated: 'Use #at: which provides equivalent bounds checking'.
+ index > self size ifTrue: [self error: 'not enough elements'].
+ ^ self at: index!
David T. Lewis uploaded a new version of Collections to project The Trunk:
http://source.squeak.org/trunk/Collections-dtl.1047.mcz
==================== Summary ====================
Name: Collections-dtl.1047
Author: dtl
Time: 9 July 2023, 11:21:58.485864 pm
UUID: bdc3ad20-7703-45aa-83ed-347892b0aea6
Ancestors: Collections-ct.1046
Deprecate SequenceableCollection>>checkedAt: which is no longer referenced in the image and has been functionally redundant for many years. SequenceableCollection>>at: provides equivalent bounds checking.
=============== Diff against Collections-ct.1046 ===============
Item was removed:
- ----- Method: SequenceableCollection>>checkedAt: (in category 'private') -----
- checkedAt: index
- index > self size ifTrue: [self error: 'not enough elements'].
- ^ self at: index!
David T. Lewis uploaded a new version of Chronology-Core to project The Trunk:
http://source.squeak.org/trunk/Chronology-Core-dtl.86.mcz
==================== Summary ====================
Name: Chronology-Core-dtl.86
Author: dtl
Time: 8 July 2023, 12:58:08.356304 pm
UUID: 5988f4f7-a957-490c-aa53-1c59e28a3179
Ancestors: Chronology-Core-dtl.85
Rearrange DateAndTime class>>now to avoid a duplicate primitiveUtcWithOffset call when using a local time zone, e.g. Olson time zone from external package TZ-Olson. Remove package preamble and postscript.
=============== Diff against Chronology-Core-dtl.85 ===============
Item was removed:
- (PackageInfo named: 'Chronology-Core') preamble: '"below, add code to be run before the loading of this package"
-
- "Remember all instances of TimeZone. These will become FixedTimeZone in the postscript"
- TimeZone instSize = 3 ifTrue: [
- Smalltalk at: #TimeZoneInstances put:
- (Dictionary newFrom: (
- TimeZone allInstances collect: [:tz |
- tz -> { tz offset . tz name . tz abbreviation }]))].
- '!
Item was changed:
----- Method: DateAndTime class>>now (in category 'ansi protocol') -----
now
"Answer time now as reported by #primitiveUtcWithOffset. If the automaticTimeZone
preference is false, use the offset provided by LocalTimeZone rather than the offset
provided by the primitive."
+ | dt |
+ dt := self basicNew initializeFromPrimitive.
self automaticTimezone
+ ifFalse: [dt localOffsetSeconds: (self localTimeZone offsetAt: dt) asSeconds ].
+ ^dt.
- ifTrue: [ ^ self basicNew initializeFromPrimitive ]
- ifFalse: [ | timeArray |
- timeArray := Time posixMicrosecondClockWithOffset.
- ^ self utcMicroseconds: timeArray first offset: self localOffsetSeconds ]
!
Item was removed:
- (PackageInfo named: 'Chronology-Core') postscript: '"Let all old instances of TimeZone become FixedTimeZone"
- (Smalltalk globals removeKey: #TimeZoneInstances ifAbsent: [])
- ifNotNil: [ :instanceData |
- instanceData keysAndValuesDo: [ :instance :data | | newInstance |
- newInstance := FixedTimeZone
- offset: data first
- name: data second
- abbreviation: data third.
- instance becomeForward: newInstance ]].
- '!
David T. Lewis uploaded a new version of Chronology-Core to project The Trunk:
http://source.squeak.org/trunk/Chronology-Core-dtl.85.mcz
==================== Summary ====================
Name: Chronology-Core-dtl.85
Author: dtl
Time: 1 July 2023, 9:01:03.976799 pm
UUID: bdd66b0f-97e1-4fd5-bca6-4194eaf60096
Ancestors: Chronology-Core-mt.82
Establish protocol for aTimeZone offsetAt: aDateAndTime. Let TimeZone be abstract and let FixedTimeZone implement the previous behavior with offset represented as a constant (no DST transition support). Other packages (e.g. TZ-Olson) may implement concrete TimeZone with DST support.
Save existing TimeZone instances in the package preamble and migrate them to FixedTimeZone in the postscript.
=============== Diff against Chronology-Core-mt.82 ===============
Item was added:
+ (PackageInfo named: 'Chronology-Core') preamble: '"below, add code to be run before the loading of this package"
+
+ "Remember all instances of TimeZone. These will become FixedTimeZone in the postscript"
+ TimeZone instSize = 3 ifTrue: [
+ Smalltalk at: #TimeZoneInstances put:
+ (Dictionary newFrom: (
+ TimeZone allInstances collect: [:tz |
+ tz -> { tz offset . tz name . tz abbreviation }]))].
+ '!
Item was changed:
----- Method: DateAndTime class>>localOffset: (in category 'squeak protocol') -----
localOffset: aDuration
"Override the local time zone (for testing). This disables the #automaticTimezone: preference"
+ self localTimeZone: (FixedTimeZone offset: aDuration name: 'Local Time (override)' abbreviation: 'LTO').
- self localTimeZone: (TimeZone offset: aDuration name: 'Local Time (override)' abbreviation: 'LTO').
!
Item was changed:
----- Method: DateAndTime class>>now (in category 'ansi protocol') -----
now
+ "Answer time now as reported by #primitiveUtcWithOffset. If the automaticTimeZone
+ preference is false, use the offset provided by LocalTimeZone rather than the offset
+ provided by the primitive."
- "Answer time now as reported by #primitiveUtcWithOffset. If the primitive is not
- available, answer the Posix epoch GMT."
self automaticTimezone
ifTrue: [ ^ self basicNew initializeFromPrimitive ]
ifFalse: [ | timeArray |
timeArray := Time posixMicrosecondClockWithOffset.
^ self utcMicroseconds: timeArray first offset: self localOffsetSeconds ]
!
Item was added:
+ TimeZone subclass: #FixedTimeZone
+ instanceVariableNames: 'offset abbreviation name'
+ classVariableNames: ''
+ poolDictionaries: 'ChronologyConstants'
+ category: 'Chronology-Core'!
+
+ !FixedTimeZone commentStamp: 'dtl 6/20/2023 08:07' prior: 0!
+ FixedTimeZone is a simple class to collect the information identifying a UTC time zone. It is typically used in unit tests to specify specific time zone offsets.
+
+ offset - Duration - the time zone's offset from UTC
+ abbreviation - String - the abbreviated name for the time zone.
+ name - String - the name of the time zone.
+
+ StaticTimeZone class >> #timeZones returns an array of the known time zones
+ StaticTimeZone class >> #default returns the default time zone (Greenwich Mean Time)
+ !
Item was added:
+ ----- Method: FixedTimeZone class>>allTimeZones (in category 'accessing') -----
+ allTimeZones
+
+ ^ self timeZones , self timeZonesDST!
Item was added:
+ ----- Method: FixedTimeZone class>>default (in category 'accessing') -----
+ default
+ "Answer the default time zone - GMT"
+
+ ^ self timeZones detect: [ :tz | tz offset = Duration zero ]!
Item was added:
+ ----- Method: FixedTimeZone class>>offset:name:abbreviation: (in category 'instance creation') -----
+ offset: aDuration name: aName abbreviation: anAbbreviation
+
+ ^ self new
+ offset: aDuration;
+ name: aName;
+ abbreviation: anAbbreviation;
+ yourself
+ !
Item was added:
+ ----- Method: FixedTimeZone class>>timeZones (in category 'accessing') -----
+ timeZones
+ ^{
+ self offset: 0 hours name: 'Universal Time' abbreviation: 'UTC'.
+ self offset: 0 hours name: 'Greenwich Mean Time' abbreviation: 'GMT'.
+ self offset: 1 hours name: 'Central European Time' abbreviation: 'CET'.
+ self offset: 2 hours name: 'South African Standard Time' abbreviation: 'SAST'.
+ self offset: -8 hours name: 'Pacific Standard Time' abbreviation: 'PST'.
+ self offset: -7 hours name: 'Mountain Standard Time' abbreviation: 'MST'.
+ self offset: -6 hours name: 'Central Standard Time' abbreviation: 'CST'.
+ self offset: -5 hours name: 'Eastern Standard Time' abbreviation: 'EST'.
+ }!
Item was added:
+ ----- Method: FixedTimeZone class>>timeZonesDST (in category 'accessing') -----
+ timeZonesDST
+ ^{
+ self offset: 1 hours name: 'British Summer Time' abbreviation: 'BST'.
+ self offset: 2 hours name: 'Central European Summer Time' abbreviation: 'CEST'.
+ self offset: -7 hours name: 'Pacific Daylight Time' abbreviation: 'PDT'.
+ self offset: -6 hours name: 'Mountain Daylight Time' abbreviation: 'MDT'.
+ self offset: -5 hours name: 'Central Daylight Time' abbreviation: 'CDT'.
+ self offset: -4 hours name: 'Eastern Daylight Time' abbreviation: 'EDT'.
+ }!
Item was added:
+ ----- Method: FixedTimeZone>>abbreviation (in category 'accessing') -----
+ abbreviation
+
+ ^ abbreviation!
Item was added:
+ ----- Method: FixedTimeZone>>abbreviation: (in category 'accessing') -----
+ abbreviation: aString
+
+ abbreviation := aString!
Item was added:
+ ----- Method: FixedTimeZone>>name (in category 'accessing') -----
+ name
+
+ ^ name!
Item was added:
+ ----- Method: FixedTimeZone>>name: (in category 'accessing') -----
+ name: aString
+
+ name := aString!
Item was added:
+ ----- Method: FixedTimeZone>>offset: (in category 'accessing') -----
+ offset: aDuration
+
+ offset := aDuration
+ !
Item was added:
+ ----- Method: FixedTimeZone>>offsetAt: (in category 'accessing') -----
+ offsetAt: dateAndTime
+ "A FixedTimeZone has a constant offset, ignoring daylight savings time transitions"
+
+ ^ offset
+ !
Item was added:
+ ----- Method: FixedTimeZone>>printOn: (in category 'private') -----
+ printOn: aStream
+
+ super printOn: aStream.
+ aStream
+ nextPut: $(;
+ nextPutAll: self abbreviation;
+ nextPut: $)!
Item was changed:
Object subclass: #TimeZone
+ instanceVariableNames: ''
- instanceVariableNames: 'offset abbreviation name'
classVariableNames: ''
poolDictionaries: 'ChronologyConstants'
category: 'Chronology-Core'!
+ !TimeZone commentStamp: 'dtl 6/15/2023 22:27' prior: 0!
+ A TimeZone answers the UTC offset for a DateAndTime based on local rules for a geographic region. For each regional time zone, the UTC offset varies as a function of the DateAndTime, notably in support of daylight savings time changes. The UTC offset for a TimeZone also may change over time as local rules are updated for various regions and political jurisdictions.
- !TimeZone commentStamp: 'dtl 7/11/2009 15:03' prior: 0!
- TimeZone is a simple class to colect the information identifying a UTC time zone.
+ Concrete subclasses are expected to implement UTC offset rules. The simple case of FixedTimeZone implements a time zone with constant offset, which is useful for unit test support.!
- offset - Duration - the time zone's offset from UTC
- abbreviation - String - the abbreviated name for the time zone.
- name - String - the name of the time zone.
-
- TimeZone class >> #timeZones returns an array of the known time zones
- TimeZone class >> #default returns the default time zone (Grenwich Mean Time)
- !
Item was added:
+ ----- Method: TimeZone class>>allForOffset: (in category 'accessing') -----
+ allForOffset: aDuration
+
+ ^ self allTimeZones select: [:ea | ea offset = aDuration]!
Item was added:
+ ----- Method: TimeZone class>>allTimeZones (in category 'accessing') -----
+ allTimeZones
+ "Various concrete implementations may be available. These may include a
+ simple StaticTimeZone or e.g. the TZ-Olson time zone tables with daylight
+ savings time offset transitions."
+
+ ^ self allSubclasses
+ inject: OrderedCollection new
+ into: [ :result :cls |
+ (cls class includesLocalSelector: #allTimeZones)
+ ifTrue: [result addAll: cls allTimeZones].
+ result].
+ !
Item was changed:
----- Method: TimeZone class>>default (in category 'accessing') -----
default
"Answer the default time zone - GMT"
+ ^ FixedTimeZone default!
- ^ self timeZones detect: [ :tz | tz offset = Duration zero ]!
Item was removed:
- ----- Method: TimeZone class>>offset:name:abbreviation: (in category 'instance creation') -----
- offset: aDuration name: aName abbreviation: anAbbreviation
-
- ^ self new
- offset: aDuration;
- name: aName;
- abbreviation: anAbbreviation;
- yourself
- !
Item was removed:
- ----- Method: TimeZone class>>timeZones (in category 'accessing') -----
- timeZones
- ^{
- self offset: 0 hours name: 'Universal Time' abbreviation: 'UTC'.
- self offset: 0 hours name: 'Greenwich Mean Time' abbreviation: 'GMT'.
- self offset: 1 hours name: 'Central European Time' abbreviation: 'CET'.
- self offset: 2 hours name: 'South African Standard Time' abbreviation: 'SAST'.
- self offset: -8 hours name: 'Pacific Standard Time' abbreviation: 'PST'.
- self offset: -7 hours name: 'Mountain Standard Time' abbreviation: 'MST'.
- self offset: -6 hours name: 'Central Standard Time' abbreviation: 'CST'.
- self offset: -5 hours name: 'Eastern Standard Time' abbreviation: 'EST'.
- }!
Item was removed:
- ----- Method: TimeZone class>>timeZonesDST (in category 'accessing') -----
- timeZonesDST
- ^{
- self offset: 1 hours name: 'British Summer Time' abbreviation: 'BST'.
- self offset: 2 hours name: 'Central European Summer Time' abbreviation: 'CEST'.
- self offset: -7 hours name: 'Pacific Daylight Time' abbreviation: 'PDT'.
- self offset: -6 hours name: 'Mountain Daylight Time' abbreviation: 'MDT'.
- self offset: -5 hours name: 'Central Daylight Time' abbreviation: 'CDT'.
- self offset: -4 hours name: 'Eastern Daylight Time' abbreviation: 'EDT'.
- }!
Item was changed:
----- Method: TimeZone>>abbreviation (in category 'accessing') -----
abbreviation
+ ^ self subclassResponsibility!
- ^ abbreviation!
Item was removed:
- ----- Method: TimeZone>>abbreviation: (in category 'accessing') -----
- abbreviation: aString
-
- abbreviation := aString!
Item was changed:
----- Method: TimeZone>>name (in category 'accessing') -----
name
+ ^ self subclassResponsibility!
- ^ name!
Item was removed:
- ----- Method: TimeZone>>name: (in category 'accessing') -----
- name: aString
-
- name := aString!
Item was changed:
----- Method: TimeZone>>offset (in category 'accessing') -----
offset
+ "Answer the current offset"
+ ^ self offsetAt: DateAndTime basicNew initializeFromPrimitive
- ^ offset
!
Item was removed:
- ----- Method: TimeZone>>offset: (in category 'accessing') -----
- offset: aDuration
-
- offset := aDuration
- !
Item was added:
+ ----- Method: TimeZone>>offsetAt: (in category 'accessing') -----
+ offsetAt: dateAndTime
+
+ ^ self subclassResponsibility
+ !
Item was removed:
- ----- Method: TimeZone>>printOn: (in category 'private') -----
- printOn: aStream
-
- super printOn: aStream.
- aStream
- nextPut: $(;
- nextPutAll: self abbreviation;
- nextPut: $)!
Item was changed:
+ (PackageInfo named: 'Chronology-Core') postscript: '"Let all old instances of TimeZone become FixedTimeZone"
+ (Smalltalk globals removeKey: #TimeZoneInstances ifAbsent: [])
+ ifNotNil: [ :instanceData |
+ instanceData keysAndValuesDo: [ :instance :data | | newInstance |
+ newInstance := FixedTimeZone
+ offset: data first
+ name: data second
+ abbreviation: data third.
+ instance becomeForward: newInstance ]].
+ '!
- (PackageInfo named: 'Chronology-Core') postscript: 'Smalltalk removeFromStartUpList: DateAndTime'!