sintonia/airtime_mvc/application/controllers
Yuchen Wang 6ffecf80c8 CC-2965: Frontend widget displays shows in UTC time
Not only were frontend widgets showing UTC time,
the SQL query was also comparing UTC timestamp with local timestamps,
causing widgets to display shows in the wrong day, etc.

Another problem was that "On air today" widget was simply calling
GetNextShows which returns shows within next 48 hours.

Fixed by:
1. Under models/Show.php:
In the GetCurrentShow/GetNextShows/GetShowsByDayOfWeek functions,
added code to convert UTC timestamp to local timestamp or vice versa,
depending on which one is more suitable, in SQL queries, thus
removing inconsistency in timezones. Also, before returning query result,
added code to convert result to local timezone.

In GetNextShows, added an optional parameter endTime to limit the interval
of shows to get. This is useful for the "On air today" widget.

2. Under models/DateHelper.php:
Added a few timezone functions to help converting timezones easier in Show.php.

3. Under controller/ApiController.php:
Added todayInfoAction which is to be used by "On Air Today" widget.
2011-11-04 16:57:24 -04:00
..
plugins CC-2833: Use ClassLoaders for PHP Files 2011-09-26 15:19:23 -04:00
ApiController.php CC-2965: Frontend widget displays shows in UTC time 2011-11-04 16:57:24 -04:00
DashboardController.php CC-2908: Add "Live Stream" title to live stream popup window 2011-10-04 17:18:36 -04:00
ErrorController.php CC-2166: Packaging Improvements. Moved the Zend app into airtime_mvc. It is now installed to /var/www/airtime. Storage is now set to /srv/airtime/stor. Utils are now installed to /usr/lib/airtime/utils/. Added install/airtime-dircheck.php as a simple test to see if everything is install/uninstalled correctly. 2011-04-14 18:55:04 -04:00
IndexController.php CC-2166: Packaging Improvements. Moved the Zend app into airtime_mvc. It is now installed to /var/www/airtime. Storage is now set to /srv/airtime/stor. Utils are now installed to /usr/lib/airtime/utils/. Added install/airtime-dircheck.php as a simple test to see if everything is install/uninstalled correctly. 2011-04-14 18:55:04 -04:00
LibraryController.php Merge branch 'devel' of dev.sourcefabric.org:airtime into devel 2011-10-22 11:34:43 -04:00
LoginController.php CC-2807: Remove AIRTIME_VERSION from constants.php and use the value in the database instead 2011-09-23 16:26:19 -04:00
NowplayingController.php CC-2833: Use ClassLoaders for PHP Files 2011-09-23 17:00:55 -04:00
PlaylistController.php CC-2833: Use ClassLoaders for PHP Files 2011-09-22 12:24:17 -04:00
PluploadController.php CC-2833: Use ClassLoaders for PHP Files 2011-09-22 12:24:17 -04:00
PreferenceController.php CC-2745: Show status of liquidsoap/icecast connection on Stream Settings page 2011-10-23 06:29:06 -04:00
ScheduleController.php CC-2436: Save pulldown settings 2011-10-18 10:10:35 -04:00
SearchController.php CC-2166: Packaging Improvements. Moved the Zend app into airtime_mvc. It is now installed to /var/www/airtime. Storage is now set to /srv/airtime/stor. Utils are now installed to /usr/lib/airtime/utils/. Added install/airtime-dircheck.php as a simple test to see if everything is install/uninstalled correctly. 2011-04-14 18:55:04 -04:00
SystemstatusController.php CC-2750: Ability to query health status for pypo, liquidsoap, media monitor, and recorder 2011-09-28 12:45:19 -04:00
UserController.php CC-2833: Use ClassLoaders for PHP Files 2011-09-23 17:00:55 -04:00