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.
I created a CCK date field:
Widget: Textfield with date popup (also tried "select list")
Default value: Relative
Customize Default Value-> From date: 28 january last year
Granularity: Y/M/D (also tried Y/M/D/H/M/S)
Everything else is default
The default value is Feb 16 2009 (today's date a year ago). Date API appears to be ignoring my day and month.
I had similar results when entering "10 September 2000" (default value was Feb 16 2010).
The following PHP code returned "00:00:00 Wednesday, Jan 28 2009":
$time_string = "28 january last year";
echo strftime("%X %A, %b %e %Y", strtotime($time_string));
Thanks!
Comments
Comment #1
DamienMcKennaUnfortunately the Drupal 6 version of the Date module is no longer supported. That said, we appreciate that you took time to work on this issue. Should this request still be relevant for Drupal 7 please feel free to reopen it. Thank you.