Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The following code, which I think is valid, throws an error message:
$date = new DateObject('31568460', 'UTC', 'U');
echo date_format_date($date, 'custom', 'U');
$ drush scr test.php
WD php: Warning: DateTime::format(): The DateTime object has not been correctly initialized by its constructor in DateObject->format() (line 239 of [warning]
/.../date/date_api/date_api.module).
DateTime::format(): The DateTime object has not been correctly initialized by its constructor in DateObject->format() (line 239 of [warning]
/.../date/date_api/date_api.module).
Comments
Comment #1
aklump CreditAttribution: aklump commentedthis comment was moved to http://drupal.org/node/1068816
Comment #2
arlinsandbulte CreditAttribution: arlinsandbulte commentedDate 7.x-1.x is unsupported.
This issue should be verified in the latest version of Date (7.x-2.x-dev) and re-opened if still valid.
Thanks