The function _announcement_drupal2unixtime() should not be used in the announcement_update() and announcement_insert() functions from Part 6 of the Drupal tutorial.
The announcement_submit() function already sets the $node->publish_date and $node->expiration_date values to a unix formatted value. Using the _announcement_drupal2unixtime() function again in the insert and update functions resulted in both dates being set to Nov 30, 1999.
$publish_date = _announcement_drupaldate2unixtime($node->publish_date);
$expiration_date = _announcement_drupaldate2unixtime($node->expiration_date);
Should be replaced by:
$publish_date = $node->publish_date;
$expiration_date = $node->expiration_date;
This topic has been locked.