summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--modules/node.module7
-rw-r--r--modules/node/node.module7
2 files changed, 8 insertions, 6 deletions
diff --git a/modules/node.module b/modules/node.module
index 0e63a81d8..4802f612b 100644
--- a/modules/node.module
+++ b/modules/node.module
@@ -1750,10 +1750,11 @@ function node_preview($node) {
$node->name = $user->name;
}
- // Set the created time when needed:
- if (empty($node->created)) {
- $node->created = time();
+ // Set the timestamps when needed:
+ if ($node->date) {
+ $node->created = strtotime($node->date);
}
+ $node->changed = time();
// Extract a teaser, if it hasn't been set (e.g. by a module-provided
// 'teaser' form item).
diff --git a/modules/node/node.module b/modules/node/node.module
index 0e63a81d8..4802f612b 100644
--- a/modules/node/node.module
+++ b/modules/node/node.module
@@ -1750,10 +1750,11 @@ function node_preview($node) {
$node->name = $user->name;
}
- // Set the created time when needed:
- if (empty($node->created)) {
- $node->created = time();
+ // Set the timestamps when needed:
+ if ($node->date) {
+ $node->created = strtotime($node->date);
}
+ $node->changed = time();
// Extract a teaser, if it hasn't been set (e.g. by a module-provided
// 'teaser' form item).