Summary

In a view showing a profile date field set to the first day of any month/year, the month will be rendered as the wrong month depending on the site's configured timezone.

Steps to repeat

  1. Create a profile date field
  2. Set the new date field's value to [any month] 1, [any year] (i.e. the first day of any month/year combination)
  3. Create a view that displays profile date field
  4. If your site's timezone in in America (and other negative GMT offsets) you will probably see the bug occur

Resolution

Using gmdate instead of date resolves the issue since timezone values are ignored in gmdate (preferred behavior)

Comments

jtwalters’s picture

StatusFileSize
new1.56 KB

This patch seems to fix the issue.

jtwalters’s picture

Status: Active » Needs review

Status: Needs review » Needs work

The last submitted patch, profile-date-view-handler-1807808-2.patch, failed testing.

jtwalters’s picture

Project: Drupal core » Views (for Drupal 7)
Version: 7.x-dev » 7.x-3.3
Component: profile.module » profile data

Sorry, I realized this was a Views issue, not Core.

jtwalters’s picture

Status: Needs work » Needs review
StatusFileSize
new1.16 KB

Reformatted the patch...hopefully this patch format is correct.

jtwalters’s picture

Issue summary: View changes

Redundant line

gruberroland’s picture

Any chance that this bug gets fixed in the next version? Views 3.7 still renders wrong values for profile date fields.

Thanks in advance for your help.

jtwalters’s picture

Issue summary: View changes
StatusFileSize
new1.44 KB

Re-rolled my patch against views 7.x-3.x — and made it relative to the views project

jtwalters’s picture

Issue summary: View changes
dawehner’s picture

Status: Needs review » Fixed

This looks perfect. Committed and pushed to 7.x-3.x. Happy christmas

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.