function plugin_item_add_update_timezones_tasks(CommonITILTask $parm)
{
    global $DB;
    $itemType = $parm->getType();
    $begin = isset($parm->fields['begin']) ? $parm->fields['begin'] : '';
    $end = isset($parm->fields['end']) ? $parm->fields['end'] : '';
    $query = "REPLACE INTO `glpi_plugin_timezones_tasks_localtimes` (`items_type`, `items_id`, `begin`, `end`) VALUES ('{$itemType}', " . $parm->getID() . ", '{$begin}', '{$end}');";
    $DB->query($query);
}