Skip to content

Commit

Permalink
Fix timezone (#22)
Browse files Browse the repository at this point in the history
* Fix timezone

* Change calendar URL
  • Loading branch information
nicoSWD authored May 18, 2024
1 parent 7bfde8d commit 1325f54
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pull_requests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:

- name: "Check diff"
run: |
curl -sSL "https://calendar.ifsc.stream/?format=json&nocache=1" --output old-calendar.json
curl -sSL "https://github.com/sportclimbing/ifsc-calendar/releases/latest/download/IFSC-World-Cups-and-World-Championships.json" --output old-calendar.json
php bin/calendar-diff old-calendar.json new-calendar.json > diff.md
if [ $(wc -w < diff.md) -gt 0 ]; then
Expand Down
24 changes: 12 additions & 12 deletions src/Domain/Calendar/PostProcess/Season2024PostProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,31 +64,31 @@ private function fetchOlympicQualifiersShanghaiRounds(IFSCEvent $event): array

return [
// 16/5
$this->round($eventInfo, "Men's & Women's Boulder Qualification", '2024-05-16T04:30:00+02:00'),
$this->round($eventInfo, "Men's & Women's Boulder Qualification", '2024-05-16T10:30:00+08:00'),

// 17/5
$this->round($eventInfo, "Men's & Women's Lead Qualification", '2024-05-17T04:00:00+02:00'),
$this->round($eventInfo, "Women's Speed Qualification", '2024-05-17T10:50:00+02:00'),
$this->round($eventInfo, "Men's Speed Qualification", '2024-05-17T11:45:00+02:00'),
$this->round($eventInfo, "Men's & Women's Lead Qualification", '2024-05-17T10:00:00+08:00'),
$this->round($eventInfo, "Women's Speed Qualification", '2024-05-17T16:50:00+08:00'),
$this->round($eventInfo, "Men's Speed Qualification", '2024-05-17T17:45:00+08:00'),

// 18/5
$this->round($eventInfo, "Men's & Women's Boulder Semifinal", '2024-05-18T03:30:00+02:00'),
$this->round($eventInfo, "Men's & Women's Lead Semifinal", '2024-05-18T07:30:00+02:00'),
$this->round($eventInfo, "Men's & Women's Speed Final", '2024-05-18T11:00:00+02:00'),
$this->round($eventInfo, "Men's & Women's Boulder Semifinal", '2024-05-18T09:30:00+08:00'),
$this->round($eventInfo, "Men's & Women's Lead Semifinal", '2024-05-18T13:30:00+08:00'),
$this->round($eventInfo, "Men's & Women's Speed Final", '2024-05-18T17:00:00+08:00'),

// 19/05
$this->round($eventInfo, "Men's Boulder Final", '2024-05-19T04:00:00+02:00'),
$this->round($eventInfo, "Men's Lead Final", '2024-05-19T06:05:00+02:00'),
$this->round($eventInfo, "Women's Boulder Final", '2024-05-19T09:25:00+02:00'),
$this->round($eventInfo, "Women's Lead Final", '2024-05-19T11:30:00+02:00'),
$this->round($eventInfo, "Men's Boulder Final", '2024-05-19T10:00:00+08:00'),
$this->round($eventInfo, "Men's Lead Final", '2024-05-19T12:05:00+08:00'),
$this->round($eventInfo, "Women's Boulder Final", '2024-05-19T15:25:00+08:00'),
$this->round($eventInfo, "Women's Lead Final", '2024-05-19T17:30:00+08:00'),
];
}

private function round(IFSCEventInfo $eventInfo, string $title, string $startsAt): IFSCRound
{
$schedule = $this->scheduleFactory->create(
name: $title,
startsAt: (new DateTimeImmutable($startsAt))->setTimezone(new DateTimeZone('Europe/Madrid')),
startsAt: (new DateTimeImmutable($startsAt))->setTimezone(new DateTimeZone('Asia/Shanghai')),
endsAt: null,
);

Expand Down

0 comments on commit 1325f54

Please sign in to comment.