I haven’t had much time to get back to this lately, but am hoping to in the next week. This thread isn’t dead until my report pages work the same in EE2 as they do in EE1.
So far, I’ve determined that the closest I can get my EE2 install to replicate the EE1 install (as far as dates go) is to run the SQL that adds the 10800 seconds back. This way, I know I’m starting from the the exact same number of seconds in both installs, regardless of what EE or the templates tries to do to the data before it renders on the template.
Hey Ryan—
I can see the unix timestamp for each entry shows a difference of 10,800 seconds between the EE1 and EE2 DBs after upgrade. I know you’ve since run a query on your DB to try to fix this difference, but can you confirm that immediately after the upgrade and before you ran the query to add 10,800 seconds, the entry date/times shown in the CP reflected that same 3 hour difference? If it wasn’t the same difference, how much of a difference was it?
We started this upgrade so long ago, that I couldn’t tell you. March 23, 2011, to be exact. I didn’t notice the date issues until I got into converting the PHP on the templates to EE2 syntax in late April.
If you create a new entry, does it also carry a 3 hour difference with the unix timestamp in the DB?
Also, I’m assuming but just want to confirm: the upgrade was from EE1 v1.6.9 - Build 20100805 to EE2 v2.1.4b - Build 20110201, correct?
I’ll have to look into the creation of new entries. I’m more concerned with older existing entries - I don’t want older financial-related data to be off in any way from what was previously reported. You are correct about the versions and build numbers.
Not that it seems to come into play here, but the edit_date column for channel entries isn’t a unix timestamp. After parsing it out, it appears to be comprised like so, based on the local time of the user who made the edit:
for example: 20110504102909
2011 - year
05 - month
04 - day
10 - hour
29 - minute
09 - second
Right. John Henry mentioned earlier in this thread: “The entry_date along with other dates are specifically stored in Unix time. The entry_Date is in another format. I will ask internally on that one for you” The edit date and entry date are definitely in different formats. Edit date doesn’t matter to me so much, but I’m just curious why everything isn’t just stored as a UNIX timestamp.
Also, I’m not sure it’s been clarified: do the values of the day/month/year columns reflect an “easy to read” version of the UTC/GMT time, or has localization voodoo been performed before putting those numbers in the DB?
You’re right that the timestamps for entries in EE1 and EE2 should be the same since both versions stored timestamps based on UTC, however using a server offset—-if the server’s timezone hasn’t changed and you didn’t use an offset in EE1—-shouldn’t be necessary.
I agree - I’ve since found that using the offset is not what I need to do. I think that without an offset, and running my now infamous +10800 query, that things are as close as they’ve been - and that is to say off by an hour. I haven’t looked at this issue since April 26, so I have to refresh my memory.