OK- I think 2 things are going on- given the generally correct results.
1. Day/week/month are not localized- so regardless of issue #2, what is pulled back won’t vary based on the user’s localization settings. It’s going to work based on the ‘date’ in the database.
2. The entry date is offset based on the server timezone. So the date in the database is not always (depending on server tz) going to be gmt ‘now’ (see set_localized_offset())- it’s then adjusted based on that same offset when it’s pulled out for use. Thus it displays correctly. Which it sounds like it’s doing. (Note that in 2.0 those dates are adjusted to a true gmt- at which point they’d give you the results you expect.)
So it sounds like it’s working as expected- the biggest issue being that the d/m/w isn’t localized- including the reversal of that server tz adjustment.
I’m wondering if we might work around it w/some creative use of the start_on parameter. I wouldn’t recommend trying to alter the way dates are handled- particularly given 2.0 alters that and expects them to be in there adjusted for server tz. But start_on could give a finer grained control and might do the trick.
Generally correct? Are you serious? I just outlined several things that no one would ever consider to be correct. Let’s go through this one by one.
1. “Day/week/month are not localized.” That’s fine I suppose. It appears some sorting code is based off of this like the problem I’m experiencing: display_by=“day” limit=“2”. When the day is wrong. Grossly wrong. It affects the display.
2. This is just wrong. My server time is set correctly. GMT -6 CST (Texas). The entry in the database gets WRONGLY CONVERTED to GMT +6 Bangladesh. There is nothing you can say to tell me that timestamp is correct in any way shape or form. Bangladesh? Seriously? Just because EE is capable of undoing this error when making the time human readable - it doesn’t make it “generally correct”. This error exacerbates #1 and makes rountine parameters like “display_by=“day” almost unusable.
I imported 21,000 items over 8 years and was forced to give them a Bangladesh timestamp in order to make them display correctly in certain situations (some situations they won’t). What happens in EE 2.0?
You stated this behavior is correct, yet the team saw fit to change the correct behavior to a “more correct behavior” and make them GMT 0.
I just checked my test installation of 2.0. The timestamp on a new post is exactly right - GMT 0 as expected (not GMT Bangladesh). The “day” field says today - as desired (note that it IS localized. Otherwise it would have put the 8th down)!
I run a daily news site. “Daily” matters to me… not “sorta daily give or take 12 hours”.
3. While there may be a work around by using different parameters - I hope you see that one shouldn’t need more fine grain control over “daily”. “Start on” doesn’t work for me because I want that page to display the last two days that have news entries - not the last 48 hours. display_by=“day” limit=“2” is supposed to do that. But it doesn’t.
So, I guess the questions are:
1. Will there be an update script available that will correct the inherent 1.6.8 timestamp mess as people move to 2.0?
or
2. Will all our old posts be read as being posted a server offset time prior to their original posting date and time?