Hi everyone,
I’m using Servoy restful web services to get data out from a Servoy solution. In the code I’m simply iterating through a dataset and returning the data:
for (var i = 1, l = vDS.getMaxColumnIndex(); i <= l; i++){
vReturnObj.data[vDS.getColumnName(i)] = vDS[0][vDS.getColumnName(i)];
}
//the method returns vReturnObj
The dataset fields which get returned have DATETIME fields among them that get automatically serialized by Servoy after the returning the object. We have 3 application servers connected to the very same database, running the same solution, and on one of them the DATETIME serialization fails. For example:
//1985-09-17 15:23:30.904 gets serialized to:
array(2) { ["time"]=> int(1890171864) ["javaClass"]=> string(18) "java.sql.Timestamp" }
//which is actually: Thu, 22 Jan 1970 21:02:51 GMT
On the other two servers the same date field gets serialized correctly. Does anybody have an idea why is it happening, or where should I start debugging this?
We are using Servoy 6.0.5, on Mac (latest Java), Windows 7 (Java 1.6.31), Windows 2003 (Java 1.6.24). The machine failing to return the correctly serialized data is the Windows 7 one.
Thanks!