Fix fallback code for primPosixMicrosecondClockWithOffset: to not allow DateAndTime class>>now to create an instance with nil instance variables. Previous fallback code was a cut and paste error, never worked as intended.
Rationale for the fallback handling: Corrupt DateAndTime can quickly lead to a broken image. A default value of the Posix epoch is easily recognized as un uninitialized DateAndTime.
To test, evaluate "Time clockPolicy: #acceptPlatformTime" and comment out the primitive call in Time class>>primPosixMicrosecondClockWithOffset: to simulate the case of a VM that does not provide primitiveUtcWithOffset. In this case, DateAndTime now produces 1970-01-01T00:00:00+00:00. After testing, do Time initialze to restore clock policy.
=============== Diff against Chronology-Core-cmm.47 ===============
Item was changed:
----- Method: Time class>>posixMicrosecondClockWithOffset: (in category 'clock') -----
"Initialize aDateAndTime initialized with local microseconds since the Posix
epoch and the current seconds offset from GMT in the local time zone."
Item was changed:
----- Method: Time class>>primPosixMicrosecondClockWithOffset: (in category 'private') -----
"Answer an array with UTC microseconds since the Posix epoch and the
current seconds offset from GMT in the local time zone. If the primitive is
not available, then answer the time and offset of Posix epoch GMT. This enables
the image to continue running in the absence of #primitiveUtcWithOffset, thus
avoiding the need to fallback code based on the earlier local microsecond clock
The parameter may be a two element array, or an object whose first two instance
variables are expected to be UTC microseconds and seconds offset from GMT."