Slot Machine should use Drupal's timezone instead of MySQL's UNIX_TIMESTAMP()
| Project: | Slot Machine |
| Version: | 6.x-1.0-beta2 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | mcarbone |
| Status: | closed |
Jump to:
The code used to determine when a slot needs to be replaced in the schedule is using the MySQL UNIX_TIMESTAMP() and NOW() functions regularly. This doesn't present a problem for "every x hour" frequency types, but it does for "daily at y" types, since the unix timestamp of "today at y" depends on the timezone. E.g., if Y is 12 noon, it will currently update at 12 noon database time, and not 12 noon Drupal-site time. Since users will likely expect their slot machine to update based on the site's configured timezone, this should be fixed so that we do not depend on MySQL functions for date/time. A fix for this should replace all MySQL time functions with Drupal/PHP ones that respect the site's current timezone.
This effects all current versions of slot machine.

#1
Fixed. Should be in the next dev release, and I'll likely spin out some new releases soon as well.
#2
Automatically closed -- issue fixed for 2 weeks with no activity.