PHP is annoying and I want to stab whoever designed AzuraCast's API
continuous-integration/drone/pr Build encountered an error
Details
continuous-integration/drone/pr Build encountered an error
Details
From the top: - gmdate needs an argument of what time to use. this one is on me being tired, but I shouldn't have to do this because - IDs are per-DJ, not per-slot, as I mentioned in my last PR. This wasn't the reason behind the issue, but if IDs were per-slot, my original dedupe would have worked *perfectly*. - AzuraCast's API gives weird ISO-8601 date strings instead of just *giving us UNIX timestamps*. Again, not the reason behind the issue, but it annoyed me when testing the dedupe fix.
This commit is contained in:
parent
8b72e32771
commit
6b6bc48ae7
|
@ -28,7 +28,7 @@ echo "DTSTAMP:".ics_formatdate("now").ICS_EOL;
|
||||||
$event_ids = array();
|
$event_ids = array();
|
||||||
|
|
||||||
foreach ($schedule as $event) {
|
foreach ($schedule as $event) {
|
||||||
$id = strval($event["id"]).gmdate("DHis").gmdate("DHis");
|
$id = strval($event["id"]).gmdate("DHis",strtotime($event["start"])).gmdate("DHis",strtotime($event["end"]));
|
||||||
if (!in_array($id,$event_ids)){
|
if (!in_array($id,$event_ids)){
|
||||||
array_push($event_ids,$id);
|
array_push($event_ids,$id);
|
||||||
// The VEVENT structure's pretty easy to generate, especially since we're already in UTC.
|
// The VEVENT structure's pretty easy to generate, especially since we're already in UTC.
|
||||||
|
|
Loading…
Reference in New Issue