Problem/Motivation
Zero-valued timestamps are converted to the current time() by MigrationBase::timestamp(), because the value is tested for empty() before is_numeric().
"0" is a valid timestamp, and should be imported as-is. This issue affects $user->access time, for example.
Proposed resolution
Switch the order of the empty() and is_numeric() checks.
Remaining tasks
Patch needs review.
User interface changes
N/A
API changes
N/A
Workaround
For the present I think there is a workaround, MigrationBase::timestamp can be tricked into importing zeros like this:
// Add to your Migration class
public function prepareRow($current_row) {
if ($current_row->access == 0) {
$current_row->access = "00";
}
}
Comments
Comment #1
grendzy commentedComment #2
mikeryanLooks good, committed, thanks!