The function node_validate in node.module doesn't allow nodes to have a negative 'created' field.
It's very limiting for my project, and I don't understand the motivation.
I'm going to collect material, some of which was produced before 1970. As it is now, Drupal cannot hold this information, nor order the nodes.
Couldn't the following line...
if (strtotime($node->date) <= 0) {
... be changed to
$created = strtotime($node->date);
if ($created === -1 || $created === FALSE) {
Btw, why not using iso, or ansi sql dates? 2038 is not that far...
But probably this stands also for 64bit systems ;)
I'm new to Drupal, and probably I've missed previous discussions.
Thank you!
Ciao. Mic
Comments
Comment #1
Crell commentedThe created field is intended for when the node was created, not when content within the node was created. If you have a lot of old information you're duplicating, like old manuscripts or an archive of congressional bills or something, I'd suggest creating a separate date field for your node, orig_date or something like that. You should be able to set that to anything you want. (If not, then I would call that a bug.)
Comment #2
tomamic commentedI see your point and I understand the opportunity, in my case, to create an ad-hoc node type.
I'll do this anyway, but I'd like to leverage the Drupal built-in ordering, which would work even without other modules and ad-hoc code.
Yet, I don't see the point for prohibiting certain dates... 32 bits are not that much, already.
I've 'patched' my local installation (I'm sure you guessed! ;) ), and I haven't found any problem.
(Well... in reality if you have windows, php4, and use negative dates, you'll get an error.)
If it's only me... Ok, I'll keep patching at every version update.
Btw, do you know if date handling was discussed before?
I hope at least in cck (or anything alse will come), a more generic solution will be available. I'll suggest there too :)
Thank you! Ciao. Mic
Comment #3
Crell commentedI think the CCK date field now allows string-based dates as an option, which should allow pre-epoch dates. If not, file a bug against that module. :-)
Comment #4
(not verified) commented