|Deploying a GemFire XD Distributed System / Configuring Multi-site (WAN) Deployments|
When multiple GemFire XD sites use WAN replication, applications must follow best practices to ensure that timestamp values are applied in a predictable way.
setTimestamp(int parameterIndex, Timestamp x)to generate and store a timestamp, then the originating GemFire XD site uses its default local time zone to calculate a SQL timestamp value. Each site that replicates the DML also uses its own local time zone to generate the SQL timestamp, so a site that is in a different time zone stores a different value. Without the original time zone information, there is no way for an application to determine the exact time when the original update took place.
setTimestamp(int parameterIndex, Timestamp x, Calendar cal)When retrieving a timestamp from the table, the recorded time zone can be used with the associated getter method, getTimestamp(int columnIndex, Calendar cal), to determine the exact time of the update.