I get an error saying that the date is invalid due to the fact that the date passed to date_default_value_part() is timestamp, while date_default_value_part() tries to parse it as DATE_FORMAT_DATETIME.

CommentFileSizeAuthor
#2 date-pass-format-2882559-2-D7.patch1.91 KBalex.bukach

Comments

Alex Bukach created an issue. See original summary.

alex.bukach’s picture

Assigned: alex.bukach » Unassigned
Issue summary: View changes
Status: Active » Needs review
StatusFileSize
new1.91 KB

We should pass the actual date format.

gg24’s picture

Hi @Alex,

Please mention the steps to reproduce this issue.

Thanks!

chris matthews’s picture

Status: Needs review » Needs work

The 2 year old patch in #2 to date_elements.inc does not apply to the latest 7.x-2.x-dev and will need to be rerolled.

Checking patch date_elements.inc...
error: while searching for:
/**
 * Helper function for the date default value callback to set either 'value' or 'value2' to its default value.
 */
function date_default_value_part($item, $field, $instance, $langcode, $part = 'value') {
  $timezone = date_get_timezone($field['settings']['tz_handling']);
  $timezone_db = date_get_timezone_db($field['settings']['tz_handling']);
  $date = NULL;

error: patch failed: date_elements.inc:202
error: date_elements.inc: patch does not apply
chris matthews’s picture

Issue tags: +Needs reroll, +Need rework
avpaderno’s picture

Issue tags: -Need rework