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.

Workaround

For project: auto_nodetitle we can use PHP like this to workaround the bug

return "Schoolverlaters " . substr("[node:field_schoolyear]", 0, 4);

Comments

clemens.tolboom’s picture

Issue summary: View changes

Added workaround and link to project: auto_nodetitle

onejam’s picture

clemens.tolboom’s picture

Status: Active » Closed (duplicate)
clemens.tolboom’s picture

@duvien thanks :)

clemens.tolboom’s picture

Issue summary: View changes

readability: replaced jaar for year