Bug 49336

GemBuilder for Smalltalk/VW

8.6, 8.5, 8.4, 8.3, 8.2, 8.1, 8.0, 7.6.1, older versions


Replicating a DateTime to a TimeStamp corrupts the client map

When a server DateTime is replicated as a client TimeStamp, it does a one-way become after being added to the identity-keyed clientMap.  This causesthe clientMap to be corrupted.

This may not cause problems, but can be detected by audit; and some operations will fail.


Load the following patch.

<?xml version="1.0"?>

<time-stamp>From VisualWorks©, 9.0 of September 20, 2019 on January 4, 2021 at 10:24:33 PM</time-stamp>

<class-id>Core.Timestamp</class-id> <category>GemStone extensions</category>

<body package="GbsKernelBaseExtVW" selector="postFaultInSession:">postFaultInSession: sess
	"GBS.  GemStone support.  The receiver is partially initialized from GemStone,
	 with year, day, and seconds (GMT seconds from midnight).  Convert to
	 a local Timestamp"
	"The GemStone milliseconds (past midnight) is mapped to millisecond"

	| local ms currentTimeZone |
	ms := self millisecond.	"Properly initialize the receiver (still in GMT)"
	self fromDate: (Date newDay: self day year: self year)
		andTime: (Time fromSeconds: ms // 1000).	"Convert from 'past midnight' to 'past the second'"
	self millisecond: ms \\ 1000.
	currentTimeZone := self appropriateTimeZoneForSession: sess.
	local := (currentTimeZone respondsTo: #universalToLocal:)
					["VW SystemTimeZone"
					(currentTimeZone universalToLocal: self) changeClassTo: self class]
					["GBS time zone"
					currentTimeZone localDateTimeFromGMT: self].
	"Reinitialize the receiver as local time"
		year: local year;
		month: local month;
		day: local day;
		hour: local hour;
		minute: local minute;
		second: local second</body>


Last updated: 8/25/23