trunk-recorder icon indicating copy to clipboard operation
trunk-recorder copied to clipboard

audioplayer.php fails on php 8.2

Open jeffbarclay opened this issue 1 year ago • 1 comments

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 avatar Oct 24 '23 12:10 jeffbarclay

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; }

jeffbarclay avatar Oct 24 '23 17:10 jeffbarclay