synchro des breakday depuis le début

This commit is contained in:
afornerot 2023-08-25 14:42:44 +02:00
parent 3ee638a857
commit 58b4d24098
1 changed files with 4 additions and 5 deletions

View File

@ -83,14 +83,13 @@ class BreakdayCommand extends Command
foreach($users as $user) {
if(!$user->hasRole("ROLE_USER")) continue;
$mini=new \Datetime('2022-03-07 00:00');
$start=new \Datetime('00:00');
$start->modify("monday this week");
$this->writeln("");
$this->writeln($user->getUsername());
$start=new \Datetime('2022-03-07 00:00');
$end=new \Datetime('00:00');
$end->modify("last day of this month");
$end->modify("next sunday");
$start->modify("previous month");
if($start<$mini) $start=clone $mini;
$response=$this->api("POST",$url."/getBreakdays",json_encode(["key"=>$key,"username"=>$user->getUsername()]));