Page 1 of 1

What we listened to at the dawn of the UNIX era...

Posted: Mon Apr 15, 2019 3:45 am
by hkingman
Hello there,

Thanks for making this cool plugin.

I had an issue where the currently playing song was displaying a time of "Jan 1, 1970, 00:00", the dawn of the so-called UNIX era, because Last.FM was not sending along a date element for currently spinning tunes. This seemed to fix things up:

Code: Select all

218,219c218,223
<             $local_timestamp = $timestamp + $offset;
<             $date_time = date_i18n( 'd M Y, H:i', $local_timestamp ); // Format the same as last.fm original
---
> 	    if ($timestamp > 0) {
>             	$local_timestamp = $timestamp + $offset;
>             	$date_time = date_i18n( 'd M Y, H:i', $local_timestamp ); // Format the same as last.fm original
> 	    } else {
> 		$date_time = "Playing now...";
> 	    }
Cheers,

-Henry

Re: What we listened to at the dawn of the UNIX era...

Posted: Sat Apr 27, 2019 8:55 pm
by Kieran
Glad you like the plugin and thanks for spotting this and for providing a fix. I'll get this released out this evening!

Re: What we listened to at the dawn of the UNIX era...

Posted: Mon Apr 29, 2019 4:53 pm
by hkingman
Update installed this morning and working fine. Goodonya... Thanks for the pull!