Those changes didn't seem to have fixed the issue as the log is still getting filled with this time zone error. I'll have to dig further and add some additional debugging output.
Code: Select all
* * * * * curl -A=Mozilla/4.0 http://www.yourforum.com/forum/cron.php?cron_type=cron.task.cron_task
/ext/phpbbservices/digests/cron/task/digests.phpdirectly using a cron. The digests extension uses phpBB's cron system.
Code: Select all
% Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- 0:00:01 --:--:-- 0 0 43 0 43 0 0 29 0 --:--:-- 0:00:01 --:--:-- 120 GIF89a € ÿÿÿ !ù , D ;
/cron/task/digests.phpwhere most of the action happens. Since there are three modes for creating digests (manual, phpBB cron and system cron) most of my testing has been in this area. Unfortunately, it's also the hardest part to troubleshoot. Mostly I have to debug using the admin log. I introduced a language variable simply to facilitate this testing, LOG_CONFIG_DIGESTS_TEST.
Major bugs fixed
- Fixed bug in mailer that incorrectly reported the hour that was run using 12 hour format (0-12) instead of 24 hour format (0-24), leading to false log entries such as hour 1 could actually have been hour 13
- Fixed bad positional parameters in the DIGESTS_DISCLAIMER language variable, fix from petr-hendl pull request (thanks)
- Fixed bug that creates a user timezone object if it does not exist. In cron mode sometimes it was not present or deallocated. It is needed to make dates and hours print out in a language independent fashion.
Minor bugs fixed
- All hours and time zone offsets are cast as floats since time zones are not necessarily offset by an integer from UTC.
- Default text for maximum display words in the ACP is no longer the same as what is in the UCP. Needed to revert to the previous language string because -1 in this value will show full display text by default.
- Language string LOG_CONFIG_DIGESTS_HOUR_RUN uses positional parameters, fix from petr-hendl pull request (thanks)
- When digests are run manually they are no longer stopped if it's been less than an hour since a digests was sent to the same user
- Fixed certain admin log entries that were added even if the logging option was turned off
Tweaks and improvements
- New check_send_hour helper function reduces duplicative code and centralizes all send hour offset logic
- PHP and template variables with gmt in the name are changed to utc
- <br /> changed to <br> when used inside of variables and expressions
- <hr /> tags in templates changed to <hr> when used inside of variables and expressions
- Constants are used to identify the mode the mailer is running (manual, regular and phpbb), makes code easier to read
- Function validateDate renamed validate_date for consistency
- Pretty quotes ’, “ and ” in language strings since this was an issue flagged by the extension review team while reviewing my Smartfeed extension
- Removed language string LOG_CONFIG_DIGESTS_DIRECTORY_CREATE_ERROR (no longer needed because this error is not easily trapped in ext.php)
- digests_html.txt uses new .newline class which makes it less likely digests will look odd, from petr-hendl pull request (thanks)
- Version check checks a new file specific to phpBB 3.2 releases
- Logic for creating and removing a /cache/phpbbservices/digests folder moved into ext.php from /cron/task/digests.php where it logically belongs as it should happen when the extension is installed
- Constructor for digests class is fully documented
- Moved board disabled check (which keeps digests from going out when the board is disabled) into the should_run function of the cron
- Made the logic in the run function of the mailer less complicated
- Since largely the same code was used to create attachment markup for both posts and private messages, moved it into a function
- Log date format shows two digit months, days and hours
Users browsing this forum: Exabot [Bot], Tbot [Bot] and 12 guests