Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 294415

Date Format Issues

$
0
0

I'm experiencing something odd and I can't seem to find a similar issue reported. I've stripped my Drupal install to the bare minimums to figure it out and I can now re-create the issue, although I don't understand why it's happening but hopefully someone can help/explain.

I have the following installed:

* Drupal core 7.35
* Ctools 1.7
* Views 3.10

After doing a fresh install with only the items listed above I create a new Page view to display fields of a basic page.

The view has the title field already added, so I simply add the field Content: Post date

When open the drop down for Date Format on this field I see the following options:
views1
Notice the Short Format and Medium Format display. They are showing up with slashes between month/day/year

Now here's the odd part. If I go to Configuration-> Date and Time on that screen both my Short and Medium date types are showing with dashes, not slashes, in the format of year-month-day.

views2

If I DON'T make any modifications to this screen and simply click the "Save configuration" button my view suddenly changes!

Now when I go back to my view if I click on the field Content: Post Date and look in my Date format drop down, the format I was seeing on my Date Time are showing up.

views3
Notice the Short Format and Medium Format display now. It is showing up with dashes as year-month-day

I'm assuming there is some sort of weird thing going on either with Views or Drupal Core. Why does views initially show a format of month/day/year (slashes) even though my Drupal Core system is showing it to be configured as year-month-day (dashes)????

Can someone point me in the right direction as to what is going on? This seems abnormal and risky. On one of our servers we've never clicked the "Save configuration" button on the Date Time screen so all our dates in views show differently than the servers where we HAVE clicked "Save configuration". This caused a bit of confusion between team members working on different server.

At the very least can someone confirm this behavior for me? Are you seeing it too? What am I missing here????

NOTE: This same issue has been posted in the views issue section too: https://www.drupal.org/node/2467739 minus the update details below.

UPDATE:
I've also found that adding the Date Module and creating a new field of type Date has the same sort of problems. This situation can be recreated by looking at the "Manage Display" section of a content type that has a date field. When you click the gear icon to alter the date format, the Long, Medium, and Short formats all display EXACTLY the same. Once I go to the Date Time config page and click "save configuration" (again, without making any changes, just clicking save) things go back to normal.


Viewing all articles
Browse latest Browse all 294415

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>