Playlist title can report wrong date

Fool2 - June 17, 2008 - 01:49
Project:Station
Version:5.x-1.2
Component:Playlists
Category:bug report
Priority:normal
Assigned:Unassigned
Status:won't fix
Description

Playlists on a site with a timezone shift may show up incorrectly in the title of the node depending on user timezone setting and global timezone setting.

For instance, http://infocusradio.org/node/247 showed 06/13/2008 in the title but in the node edit for it shows June 14 2008. When I edit it as an admin and I save it it sets the day correctly (because my own offset is then same as the server's).

In station_playlist_validate(), the "date" field is converted to a timestamp using mktime().

Mktime() is not fed a time offset.

The timestamp is then fed to format_date(), a drupal function that uses the user's or default timezone if no time offset is fed to it.

I think this will occur in a small number of installations and I'm not sure a properly configured site should do it. I'm also not sure what the solution should be. My first thought is to make sure that mktime() and format_date() are called with the same time offset. I am not sure if this would have any other effects.

If anyone else has noticed this issue I'd like to know more.

#1

Fool2 - June 20, 2008 - 21:03

Solved this temporarily by turning off user customizeable timezones.

#2

drewish - September 28, 2009 - 20:19
Status:active» won't fix

the 5.x-1.x branch is no longer supported.

 
 

Drupal is a registered trademark of Dries Buytaert.