On node editing, i have a cck date field of type date (not datestamp) with granularity year.
I can save 1969 and 1971 to it but not 1970.
Checked for known issues but most are old and fixed.

I'm using date 6.x-2.6, php 5.2.9 and mysql 5.0.91.
Could manually enter 1970-00-00T00:00:00 in phpmyadmin but then drupal won't let me edit the node.
The error displayed is:

There are errors in Year:

* The From date is invalid.
* The To date is invalid.

Comments

Remon’s picture

Component: Date CCK Field » PHP4 Module
Remon’s picture

Component: PHP4 Module » Date CCK Field

Ops, I was intending to update another issue :S

inforeto’s picture

Version: 6.x-2.6 » 6.x-2.7

Problem continues, years before 1970 are fine, only 1970 don't validate.
Don't know if it is an issue with the module or something to check on php or mysql.

As far as i grep the string of the actual error only appears here:

date/date_elements.inc
function date_combo_validate
line 507

      // Test a roundtrip back to the original timezone to catch
      // invalid dates, like 2AM on the day that spring daylight savings
      // time begins in the US.
      date_timezone_set($from_date, timezone_open($timezone));
      date_timezone_set($to_date, timezone_open($timezone));
      if ($test_from != date_format($from_date, 'r')) {
        $errors[] = t('The From date is invalid.');
      }
      if ($test_to != date_format($to_date, 'r')) {
        $errors[] = t('The To date is invalid.');
      }

And this compares $from_date before and after date_timezone_set.

Using date 6.x-2.7 and php 5.3.6

Any ideas o pointers?
Thanks

fr34ck’s picture

Title: can't save 1970 on cck date field » can't save 1916 on cck date field
Component: Date CCK Field » Code

I have the same issue but for year 1916!
I can save values 1915 and 1917, but the value 1916 give me an error:
* The From date is invalid.
* The To date is invalid.

damienmckenna’s picture

Issue summary: View changes
Status: Active » Closed (outdated)

We're sorry but the D6 release of Date module is no longer being supported. You are encouraged to update to Drupal 7 or 8, or direct questions to Drupal Answers.