Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

audioplayer.php fails on php 8.2 #848

Open
jeffbarclay opened this issue Oct 24, 2023 · 1 comment
Open

audioplayer.php fails on php 8.2 #848

jeffbarclay opened this issue Oct 24, 2023 · 1 comment

Comments

@jeffbarclay
Copy link

jeffbarclay commented Oct 24, 2023

the strftime is depicted in newer php versions

[Tue Oct 24 08:25:49 2023] PHP Warning: Cannot modify header information - headers already sent by (output started at /Users/me/gr-osmosdr/audioplayer.php:126) in /Users/me/gr-osmosdr/audioplayer.php on line 155
[Tue Oct 24 08:25:49 2023] [::1]:56733 [200]: GET /audioplayer.php?since=0&tg=&date=

line 126: 'date' => strftime('%F %T', $TIME),

@jeffbarclay
Copy link
Author

not the most eloquent time format but at least this worked:

ADD:
date_default_timezone_set('America/New_York');
$date = new DateTimeImmutable();

REPLACED:
'date' => strftime('%F %T', $TIME),
WITH:
'date' => date("Y-m-d\TH:i:s\Z",$TIME),

** would like the Z to show milliseconds

Not sure what the following does, but times are correct on filtered list???

if ($filter_date->format('Y-m-d') != strftime('%F', $TIME))
{
continue;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant