Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
hook_cron() function is using incorrect date calculation.
Table 'weather_forecasts' field 'time_to' is using local time, not UTC, so why check for current UTC time?
Patch attached.
Comment | File | Size | Author |
---|---|---|---|
#1 | cron_utc_time-2315743.patch | 682 bytes | rudins |
Comments
Comment #1
rudins CreditAttribution: rudins commentedComment #3
toddy CreditAttribution: toddy commentedThanks for the bug report, this is fixed in the latest release. Although I did not use exactly your patch, because the local time (of the computer, not the location of the forecast) would be equally wrong. I've now settled to calculate yesterday in UTC time, that should even catch the western timezones which are some hours behind UTC.
Regards,
Tobias