Hi,

I have problem in a "View". I add a date field from Content Type "mycontent type" in View and date field displays only the current date like April 17, 2015 in the front-end when "Formatter" is Date and time.

But when I choose "Formatter" --> Plain, I get the correct date(the date stored in back-end) with this format 2015-03-29 despite any of the available views for users that chose such as Long, Medium, Short or my Custom.

Any ideas what's going on? I try to clear cache and change field's display from Content Type page but nothing works...

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Lostboy22’s picture

Check your view settings
Advanced, Contextual Filter, "When the filter value is NOT in the URL"

jcfiala’s picture

Hi! I'm having the exact same problem!

Only, I don't have the problem on my development machine. I exported the view and put it in a hook_views_default_view, and when it showed up on Staging, all the date of birth column showed was today's date! When the view reached production, the date of birth is again working correctly.

Following nikmoustakas's suggestion, I changed the field to 'Plain', and it's showing the correct date now, although not formatted.

The date for the user isn't part of the contextual filter, although the last name from the same entity is.

Any ideas? Again, this view is working properly in two out of three environments.

ThePixelMines’s picture

I, too, am having an issue like this. I have a user account field that is pulling an ISO date from active directory (yyyy-mm-dd). Only when set to display as "Plain" will it display the entered date on the users account page or in a view. Any other format (including time ago) renders today's date.

If I add a date manually to the field (an account not connected to the LDAP server), the date works normally.

codechefmarc’s picture

I ran into this issue as well and I changed my date field from ISO format to UNIX format and that seemed to fix it.

bloomt’s picture

Is there any way to solve this issue without switching date formats?

mrdrewkeller’s picture

Was there ever another solution found for this without changing the formatter?

I just encountered this issue in a D7 site. As stated above changing the formatter to "Plain" fixes it for me.

Haven't been able to figure out what is causing the issue though.

DamienMcKenna’s picture

Version: 7.x-2.8 » 7.x-2.x-dev
tripodcreative’s picture

I can confirm this issue is still occurring with the latest stable and beta release.

tripodcreative’s picture

Version: 7.x-2.x-dev » 7.x-2.10
Priority: Normal » Critical

Changing issue priority to critical as this breaks the primary function of the date displays.

DamienMcKenna’s picture

Version: 7.x-2.10 » 7.x-1.x-dev
Category: Support request » Bug report
Priority: Critical » Major
Parent issue: » #2867810: Plan for Date 7.x-2.11 release

"Critical" issues are primarily for things that break the data, so lets demote this slightly to "major". It also sounds like a bug

Lets get this sorted out for the next release.

steinmb’s picture

Version: 7.x-1.x-dev » 7.x-2.x-dev

I think this should be the 7.x-2.x branch

DamienMcKenna’s picture

Removing this from the list for the next stable release, hopefully we'll get to it afterwards.