I created a view to show Alumni by graduation year.
The only problem I have is when the date is January 1 for any year. The view shows the previous year.
For example is an alumni has Jan 1 2006 set as the graduation date the view will display 2005 instead if 2006 and the alumni will be listed under that year.
My alumni node is a cck and date field type for the graduation year. I suspect the problem is somewhere in the views module because I used the timeline view and it shows the alumni in the correct year even on the Jan 1 end case.
Thanks for any help.
I have attached my exported view.
| Comment | File | Size | Author |
|---|---|---|---|
| alumni_by_grad.txt | 2.41 KB | skassam |
Comments
Comment #1
merlinofchaos commentedWhat database and version are you using?
For some older versions of MySQL, there are timezone issues (resulting in a date being off by the distance your timezone is from GMT in some cases) that are not fixable. I think MySQL 4.1 and later fixes this.
Comment #2
skassam commentedWow. Thanks for the information. I had no idea that was an issue. I am using version 4.0.24. For clarification is it the timezone settings in drupal and mysql that cause the issue or the timezone settings between the system (OS) and mysql that cause the issue.
Thanks for the prompt response.
Comment #3
merlinofchaos commentedYes, the issue is that Drupal sets the timezone to GMT for all dates; MySQL assumes the timezone for a given unix timestamp will be in the "Server's time zone" whatever that is.
Versions of MySQL prior to 4.1.3 cannot override this behavior. Versions later than 4.1.3 can, and Views has a bit of code to take advantage of that.
Comment #4
catch