When we create a timezone on PUT we should set the last_modified.

Ideally from the LAST-MODIFIED property in the VTIMEZONE, but failing
that we should at least use the gmdate() of the current time.
This commit is contained in:
Andrew McMillan 2011-10-05 17:00:37 +02:00
parent 7e5b6a28b6
commit 147abf71c6

View File

@ -566,7 +566,11 @@ EOSQL;
if ( $qry->Exec('PUT',__LINE__,__FILE__) && $qry->rows() == 0 ) {
$params[':olson_name'] = $olson;
$params[':vtimezone'] = (isset($tz) ? $tz->Render() : null );
$qry->QDo('INSERT INTO timezones (tzid, olson_name, active, vtimezone) VALUES(:tzid,:olson_name,false,:vtimezone)', $params );
$params[':last_modified'] = (isset($tz) ? $tz->GetPValue('LAST-MODIFIED') : null );
if ( empty($params[':last_modified']) ) {
$params[':last_modified'] = gmdate('Ymd\THis\Z');
}
$qry->QDo('INSERT INTO timezones (tzid, olson_name, active, vtimezone, last_modified) VALUES(:tzid,:olson_name,false,:vtimezone,:last_modified)', $params );
}
}
else {