Today, I needed this feature, which has been asked for by a few people: http://drupal.org/node/46517

I've tested the attached patch in PHP 4 & PHP 5.

CommentFileSizeAuthor
#5 node.module.patch504 bytesmvc
#3 node.module.patch538 bytesmvc
node.module.patch575 bytesmvc
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

StevenPatz’s picture

Version: 5.7 » 7.x-dev
drewish’s picture

Status: Needs review » Needs work

the coding standards say false should be capitalized.

mvc’s picture

Status: Needs work » Needs review
FileSize
538 bytes

@drewish: thanks for the comments. I've changed the capitalization, and generated a new patch against 7.x-dev.

chx’s picture

Status: Needs review » Needs work

// Validate the "authored on" field. As of PHP 5.1.0, strtotime returns FALSE instead of -1 upon failure.
Drupal 7 is PHP 5.2 only. You can simplify the condition and as a side affect get access to negative timestamps. Win-win.

mvc’s picture

Status: Needs work » Needs review
FileSize
504 bytes

@chx: good catch. I've updated that now.

obsidiandesign’s picture

Applies correctly to HEAD. Tested with 1969-01-01 for authored date, and date is accepted into db & displays correctly. Also, all Node SimpleTests run successfully after applying this patch. +1 for RTBC.

Anonymous’s picture

Status: Needs review » Needs work

The last submitted patch failed testing.

mvc’s picture

Status: Needs work » Fixed

The status of this issue was never changed, but this fix is in DRUPAL-7-0-UNSTABLE-2 (which is why the patch currently fails automated testing), so I'm going to mark this issue fixed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.