When I create or edit a content type (admin/content/node-type/[content-type]/fields) and add a date, datestamp, or datetime field that uses the Widget type "Text Field with custom input", and set the "Custom Input Format" to U (a.k.a. Seconds since the Unix Epoch), it always reverts to 1262322000 (a.k.a. Fri, 01 Jan 2010 05:00:00 GMT) no matter what you put in the field.

To better illustrate this issue, I have created a sample site using a fresh install of Acquia Drupal 1.2.26 (Date 6.x-2.4), you can see the configuration settings and (anonymous users can) create a sample date post here: http://datedemo.chrdev.com

Please excuse me if this bug has already been reported, I found some similar issues (#600352: Time not taken with custom format & #798244: Custom input format in admin/content/node-type/*/fields/field_* broken. Choose date from popup, always set to now.), but I wasn't sure if these were exactly the same issue.
Thanks for looking,
-Chris

Comments

ChrisRut’s picture

notluap’s picture

I am also having this issue... using v2.8.

Choose "U" as custom input format. Enter date in unix time format, date always reverts to Jan 1 of that year.

ckng’s picture

Version: 6.x-2.4 » 6.x-2.x-dev
Status: Active » Needs review

Having same issue where date field with custom input format always return invalid. I'm using m/Y
The offending line seems to be date_api.module (line 1484), removed the ! only the rest of the scope make sense?

if (!in_array($max_granularity, array('year', 'month'))) {
    if (in_array('year', $granularity) && !date_valid_year($year)) {
      return FALSE;
    }
...
damienmckenna’s picture

Issue summary: View changes
Status: Needs review » Closed (won't fix)

Unfortunately the D6 version of this module is no longer supported, but we appreciate the time you put into this. If this problem is relevant for D7 too, please reopen the issue. Thanks.