mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-03-15 08:20:12 +00:00
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:
parent
7e5b6a28b6
commit
147abf71c6
@ -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 {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user