Hi,
In order to import some data in another system, I must read the simple_commerce_purchases and especially the date. I see that this is an int(12) in phpmyadmin. How is the date stored in this column (my first guess was for ticks but this does not work) and if someone has an instant answer for converting it to a .net DateTime…
Oh, and is it UTC ? Server Local ?
Update:
I’m very close by doing this:
DateTime dateTime = new System.DateTime(1970, 1, 1, 0, 0, 0, 0);
dateTime = dateTime.AddSeconds(orderdate /* int read from the database */);
But this gives me this:
Paypal gives an order date of Nov 18, 2009 12:45:20 PST
The EE admin panel shows 2009-11-18 03:45 PM (which seems correct since I’m hosted at enginehosting which I guess is PST+3 i.e. EAST time)
My localization setting in EE is UTC-5 (east time in Montreal)
My code above gives 11/19/2009 2:45:28 AM
Thank you
Nicolas