6 users online. Create an account or sign in to join them.Users
A few bugs with Date filtering
This is an open discussion with 11 replies, filed under General.
Search
Are you on PHP5.2 or 5.3? I've seen a recent discussion that found some date bugs with 5.2 in recent Symphony versions.
I've got PHP 5.3.1 Using Xampp on Mac OS X Lion
I believe it is been solved, I'm just not sure when it will be released:
The new update to class.datetimeobj.php has fixed this problem. Thanks guys.
I'm not sure if your second filter should work actually: your second example tries to match dates that are today and later than today at the same time. How is that supposed to work? If you are looking for an "or" statement you should either use equal to or later than today or today, later than today.
Thank you Nils. You're right. It doesn't work in Symphony 2.2.3 So I've used equal to or later than today which works fine after I've updated to the new class.datetimeobj.php
However, {$today} + later than {$today} works as well in 2.2.1
also, later than yesterday
However, {$today} + later than {$today} works as well in 2.2.1
We should consider this as a bug (that has already been fixed in the latest version).
Hello everyone,
I think I'm running into a bug and I'm not sure what to do.
I'm using Symphony 2.2.5 with the Date and Time field 2.2.3 for a blog. I'm trying to browse the blog by year and month (archive). So the url is like this:
blog/archive/{year}/{month}/
When accessing blog/archive/2011 I want all the articles from 2011, and when accessing blog/archive/2011/11/ I want all the article from november 2011.
I got it working fine on local php 5.3 and I'm having trouble with php 5.2.17
On the local version filter I had this:
{$year} + {$year}-{$month}
Which worked perfectly with 5.3
With 5.2.17 it seams {$year}-{$month} does not work. Even without parameter like 2011-11.
So I came up with this:
{$year}-01-01 to {$year}-12-31 + {$year}-{$month}-01 to {$year}-{$month}-31
This almost work, but I'm having trouble with month that are not 31 days. It seams 2011-11-31 is converted to 2011-12-01.
So I'm not sure which way to go now. Any help will be much appreciated.
Thanks.
Antoine
PHP's date management is a mess, especially on 5.2. Do you have to stick to 5.2? Version 5.3 works way better.
Turns out I can upgrade!
I didn't even thought about that.. Thanks a lot Nils!
Create an account or sign in to comment.
Hi,
I'm creating a website where I display upcoming events and past events. I've created two datasources Upcoming Events and Past Events.
For Upcoming Events I'm filtering the events according to the date when they will take place using
later than {$today}However, when I use
{$today} + later than {$today}I get no results. I've used this syntax on another website powered by Symphony 2.2.1 and it works fine but not in 2.2.3 that I'm using at the moment.
Again for Past Events where I use the filter
earlier than {$today}I get no results.
Has anybody else encountered this problem and found a solution?
Thanks, Ovi