Closed (duplicate)
Project:
Date
Version:
7.x-2.6
Component:
Date Field
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
9 Oct 2012 at 15:05 UTC
Updated:
28 Apr 2013 at 16:28 UTC
I have a Date (ISO format) with
- Date attributes to collect: only year selected
- Default value: now
When entering 1970 and using this for project: auto_nodetitle token value year 2012 is displayed.
Token
[node:field-schoolyear:custom:Y] [node:field_schoolyear]
results in
2012 1970-01-01T00:00:00
Adding a new data format on /admin/config/regional/date-time does not help.
I've searched for other issues
- http://drupal.org/project/issues/date?text=1970&status=All&priorities=Al...
- http://drupal.org/project/issues/date?text=default&status=All&priorities...
but found none.
For project: auto_nodetitle we can use PHP like this to workaround the bug
return "Schoolverlaters " . substr("[node:field_schoolyear]", 0, 4);
Comments
Comment #0.0
clemens.tolboomAdded workaround and link to project: auto_nodetitle
Comment #1
onejam commentedThis patch fixes this issue: http://drupal.org/node/1197278#comment-5805310
Comment #2
clemens.tolboomSo this is a duplicate of #1197278: Date tokens are not displaying correctly
Comment #3
clemens.tolboom@duvien thanks :)
Comment #3.0
clemens.tolboomreadability: replaced jaar for year