I am using this code to retrieve the data
Code: Select all
sql = " SELECT Name, Gender, DATE_FORMAT(CreationDate, '%W, %D %M %Y') as CreationDate FROM user WHERE id="+userId;
ISFSArray infoResult = dbManager.executeQuery(sql);
response.putSFSArray("userInfo", infoResult);
I am retrieving the value with
Code: Select all
string createDate = ConvertFromUnixTimestamp(Convert.ToDouble(userInfo.GetSFSObject(i).GetData("CreationDate").Data.ToString())).ToString();
where ConvertFromUnixTimestamp looks like this
Code: Select all
static DateTime ConvertFromUnixTimestamp(double timestamp)
{
Debug.Log(timestamp);
DateTime origin = new DateTime(1970, 1, 1, 0, 0, 0, 0);
return origin.AddMilliseconds(timestamp);
}
Now I might be doing something wrong here, but i am unable to see the mistake at this hour. I don't know what to say I've checked the timestamps and difference is the same 7200 seconds (2 hours).
P.S. I am on RC2 haven't got the time to update the server, but is the first thing i am going to check tomorrow.