mirror of
https://github.com/alextselegidis/easyappointments.git
synced 2024-11-09 17:42:21 +03:00
Merge pull request #967 from bevanjkay/all-day-google-events
All day google events
This commit is contained in:
commit
718fbf97aa
2 changed files with 18 additions and 15 deletions
|
@ -184,7 +184,20 @@ class Google extends EA_Controller {
|
|||
|
||||
if ($google_event->getStart()->getDateTime() === $google_event->getEnd()->getDateTime())
|
||||
{
|
||||
continue; // Skip all day events
|
||||
$event_start = new DateTime($google_event->getStart()->getDate());
|
||||
date_time_set($event_start, 0, 0);
|
||||
$event_start->setTimezone($provider_timezone);
|
||||
$event_end = new DateTime($google_event->getEnd()->getDate());
|
||||
date_modify($event_end, '-1 day');
|
||||
date_time_set($event_end, 23, 59);
|
||||
$event_end->setTimezone($provider_timezone);
|
||||
}
|
||||
else
|
||||
{
|
||||
$event_start = new DateTime($google_event->getStart()->getDateTime());
|
||||
$event_start->setTimezone($provider_timezone);
|
||||
$event_end = new DateTime($google_event->getEnd()->getDateTime());
|
||||
$event_end->setTimezone($provider_timezone);
|
||||
}
|
||||
|
||||
$results = $CI->appointments_model->get_batch(['id_google_calendar' => $google_event->getId()]);
|
||||
|
@ -194,10 +207,6 @@ class Google extends EA_Controller {
|
|||
continue;
|
||||
}
|
||||
|
||||
$event_start = new DateTime($google_event->getStart()->getDateTime());
|
||||
$event_start->setTimezone($provider_timezone);
|
||||
$event_end = new DateTime($google_event->getEnd()->getDateTime());
|
||||
$event_end->setTimezone($provider_timezone);
|
||||
|
||||
// Record doesn't exist in the Easy!Appointments, so add the event now.
|
||||
$appointment = [
|
||||
|
|
14
package-lock.json
generated
14
package-lock.json
generated
|
@ -98,7 +98,7 @@
|
|||
},
|
||||
"ansi-colors": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "http://registry.npmjs.org/ansi-colors/-/ansi-colors-1.1.0.tgz",
|
||||
"resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-1.1.0.tgz",
|
||||
"integrity": "sha512-SFKX67auSNoVR38N3L+nvsPjOE0bybKTYbkf5tRvushrAPQ9V75huw0ZxBkKVeRU9kqH3d6HA4xTckbwZ4ixmA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
|
@ -5966,11 +5966,6 @@
|
|||
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
|
||||
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
|
||||
},
|
||||
"ini": {
|
||||
"version": "1.3.5",
|
||||
"resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz",
|
||||
"integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw=="
|
||||
},
|
||||
"inquirer": {
|
||||
"version": "3.3.0",
|
||||
"resolved": "https://registry.npmjs.org/inquirer/-/inquirer-3.3.0.tgz",
|
||||
|
@ -11833,10 +11828,9 @@
|
|||
"integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4="
|
||||
},
|
||||
"ini": {
|
||||
"version": "1.3.5",
|
||||
"resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz",
|
||||
"integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==",
|
||||
"dev": true
|
||||
"version": "1.3.7",
|
||||
"resolved": "https://registry.npmjs.org/ini/-/ini-1.3.7.tgz",
|
||||
"integrity": "sha512-iKpRpXP+CrP2jyrxvg1kMUpXDyRUFDWurxbnVT1vQPx+Wz9uCYsMIqYuSBLV+PAaZG/d7kRLKRFc9oDMsH+mFQ=="
|
||||
},
|
||||
"inquirer": {
|
||||
"version": "0.12.0",
|
||||
|
|
Loading…
Reference in a new issue