[squeak-dev] [error] DateAndTime changes produce different result on #readFrom:

Marcel Taeumel marcel.taeumel at hpi.de
Mon Mar 2 17:48:11 UTC 2020

Hi, there.

The internal representation of DateAndTime changed from


in Squeak 5.2 to this in 5.3:



If tests in "Cryptography" relied on the internal representation of DateAndTime, those tests have to be adapted. Looking at ASN1Test >> #testUTCTime, this is the case:


| bytes obj testObj newBytes |
bytes := #[23 13 48 55 48 51 50 50 49 53 53 56 49 55 90].
testObj := DateAndTime fromString: '2007-03-22T15:58:17+00:00'.
obj := ASN1InputStream decodeBytes: bytes.
self assert: (obj = testObj).
newBytes := ASN1OutputStream encode: testObj.
self assert: (bytes asByteArray = newBytes).
newBytes := ASN1OutputStream encode: obj.
self assert: (bytes asByteArray = newBytes).

The "bytes" are different for (encoded) instances of DateAndTime in Squeak 5.3.

Am 02.03.2020 18:31:51 schrieb Robert via Squeak-dev <squeak-dev at lists.squeakfoundation.org>:
In truth, this is an issue with incomplete DateAndTime testing. As there
are resulting differences, this ought to be tested  and modified in the
package containing the core DateAndTime definition and NOT an override
in the Cryptography package. I do not know who owns DateAndTime. I will
continue to slowly dig into the issue..

K, r

On 3/2/20 12:23 PM, Robert wrote:
> In calling this method:
> DateAndTime fromString: '2007-03-22T15:58:17+00:00'.
> The results in 5.3 are different than in 5.2. This is breaking 2
> ASN1Tests and 2 X509Tests. I am still in analysis of the decoding
> differences. The methods between the two versions are completely
> different. This breaks Cryptography.
> K, r

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20200302/905ca4ee/attachment.html>

More information about the Squeak-dev mailing list