Commit d5cd111e authored by Raph El's avatar Raph El
Browse files

TimeZone : modif bash + add bash in devLog

parent 3d51f3b7
......@@ -7429,7 +7429,7 @@ if( Role::isSuperAdmin(Role::getRolesUserId(Yii::app()->session["userId"]) )){
}
}
public function actionRecurentEvents() {
public function actionRecurentEventsTimeZone() {
if( Role::isSuperAdmin(Role::getRolesUserId(Yii::app()->session["userId"]) )){
$events=PHDB::find(Event::COLLECTION,
array(
......@@ -7451,7 +7451,18 @@ if( Role::isSuperAdmin(Role::getRolesUserId(Yii::app()->session["userId"]) )){
$timezone = array(
"FR" => "Europe/Paris",
"BE" => "Europe/Brussels",
"RE" => "Indian/Reunion"
"RE" => "Indian/Reunion",
"ES" => "Europe/Madrid",
"MX" => "America/Mexico_City",
"MQ" => "America/Martinique",
"AT" => "Europe/Vienna",
"DE" => "Europe/Berlin",
"CL" => "America/Santiago",
"CH" => "Europe/Zurich",
"IT" => "Europe/Rome",
"GF" => "America/Cayenne",
"MC" => "Europe/Monaco",
"GP" => "America/Guadeloupe"
);
//Rest::json($count); exit;
foreach ($events as $key => $value) {
......@@ -7539,14 +7550,23 @@ if( Role::isSuperAdmin(Role::getRolesUserId(Yii::app()->session["userId"]) )){
"fuseau" => array()
);
$timezone = array(
"FR" => "Europe/Paris",
"BE" => "Europe/Brussels",
"RE" => "Indian/Reunion",
"ES" => "Europe/Madrid",
"MX" => "America/Mexico_City"
"MX" => "America/Mexico_City",
"MQ" => "America/Martinique",
"AT" => "Europe/Vienna",
"DE" => "Europe/Berlin",
"CL" => "America/Santiago",
"CH" => "Europe/Zurich",
"IT" => "Europe/Rome",
"GF" => "America/Cayenne",
"MC" => "Europe/Monaco",
"GP" => "America/Guadeloupe"
);
//Rest::json($count); exit;
foreach ($events as $key => $value) {
if( !empty($value["address"]) && !empty($value["address"]["addressCountry"]) ){
......@@ -7624,7 +7644,7 @@ if( Role::isSuperAdmin(Role::getRolesUserId(Yii::app()->session["userId"]) )){
$result = array(
"count" => $count,
"timezone" => $timezone,
"events" => $events,
//"events" => $events,
);
Rest::json($result);
......@@ -7635,10 +7655,13 @@ if( Role::isSuperAdmin(Role::getRolesUserId(Yii::app()->session["userId"]) )){
$date = new DateTime("2020-05-08T15:30:00+04:00");
$newD = new DateTime();
$timezoneEvent = new DateTimeZone($date->getTimezone()->getName());
$format = $date->format(DateTime::ISO8601);
$date2 = new DateTime($format);
$res = array(
"date" => $date,
"newD" => $newD,
"timezoneEvent" => $timezoneEvent
"timezoneEvent" => $timezoneEvent,
"format" => $date2
);
Rest::json($res); exit;
Rest::json($date->getTimezone()->getName());
......
......@@ -9,6 +9,16 @@ co2/datamigration/ModifyCostumDB
/////////////////////////// End permanent bash /////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////
///////////////// BASH VERSION 0.995 - 11/05/2020 //////////////////////////////////
** BASH pour ajouter la timeZone au events
=> co2/datamigration/RecurentEventsTimeZone
=> co2/datamigration/EventsTimeZone
///////////////////////// END BASH ////////////////////////////////////////////////
///////////////// BASH VERSION 0.994 - 31/01/2020 //////////////////////////////////
** BASH copie des tags présent dans list dans la collections tags
co2/datamigration/BashforeachActiveTags
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment