I have created a view with the following schema and arguments (the latter between square brackets):
/fechas/[year]/[month]/[day] (fechas means "dates" in Spanish)
Everything is OK but the day, which is displayed in pages as the real date minus one. I.e., this url:
/fechas/2009/01/19
is showing the list of nodes published on that date, whilst the title of that page is "Entradas del 18 de Enero de 2009" (Entries for January, 18, 2009). The Title for the day argument is "Entradas del %3 de %2 de %1".
As I say, /fechas/2009 is showing the right year (entries for 2009), and /fechas/2009/01 is also correctly displaying the entries for January, 2009.
I'm sure this has been introduced in 6.x-2.3. I "downgraded" to 6.x-2.2 and everything is correct. I believe this fix is the cause, since now I'm experiencing exactly the opposite described there (in his example I type "blogs/2008/12/10" and get "Posts on December 09, 2008" instead of "Posts on December 11, 2008" as he was seeying). If I use the first day of the month in the url (e.g. blogs/2009/01/01) I get the 30th day of that month (even if it's February).
Just to clarify, the URL and the selection are OK. I think it's just the display in the page and the attachment that's messed up. Maybe the fix above didn't take that into account?
Please let me know if you need any more examples or info.
Thanks
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | views_date_timezone.patch | 2.37 KB | Joshua Hesketh |
Comments
Comment #1
dawehnerCould you please, try to reproduce it with the newest views version? If it does work there, please close the issue. Thanks!
Comment #2
Joshua Hesketh commentedHello,
I'm running Views 6.x-2.8 and I can confirm that this bug exists.
Each day display is one below the correct one. For example, if I have a URL of /blog/2010/02/03 my title will say "Blog posts for 02 February 2010". If I have a URL of /blog/2010/02/01 it actually wraps around giving me a title of "Blog posts for 30 February 2010".
I hope to look into it in the next few days but at the moment I'm just fiddling with my views set up.
Cheers,
Josh
Comment #3
Joshua Hesketh commentedAs far as I can tell this seems due to the timezones being set to GMT0 rather than the users timezone. Not sure if there was a reason for doing this, but I can't see any ramifications to setting it to the users timezone. Thus I have attached a patch that should fix the issue (testing needed). There may be other places where timezones are handled incorrectly, I'm not sure.
Comment #4
graker commentedHello.
I tested the patch. The issue is still in place despite the fix of timezones :(
Comment #5
Joshua Hesketh commentedThat's odd.. Could you give us some more details please?
For example, how is your view set up and what time zones are you using?
Thanks,
Josh
Comment #6
graker commentedI'm using GMT+3 (Moscow). Dates are showing with offset -1. E.g. if I have post at 2010/02/18, it would show like 17 of February.
By the way, I tried to reset timezone for test user to GMT+0, then the offset even increased (-2), so for 2010/02/18 test user got 16 of February :)
To give you details about my view setup, should I post here the export output, is it okay?
Comment #7
merlinofchaos commentedI have a feeling that the problem here is the site timezone. strtotime() is giving odd results because different systems have different timezones set. I don't think this patch as is fixes the problem. Or rather, it fixes the problem on one system, breaks it on another.
Comment #8
esmerel commentedLikely not a views issue; timezones are problematic all over. This issue hasn't had any work done it in months.