[wp-trac] [WordPress Trac] #16993: wp-mail.php doesn't account for half-hour and quarter-hour timezones.
WordPress Trac
wp-trac at lists.automattic.com
Tue Mar 29 06:55:06 UTC 2011
#16993: wp-mail.php doesn't account for half-hour and quarter-hour timezones.
---------------------------+-----------------------------
Reporter: neoscrib | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Blog by Email | Version: 3.1
Severity: trivial | Keywords:
---------------------------+-----------------------------
To reproduce the problem, install Wordpress and set it to post by email.
Send a post from an email address which is configured to use a half-hour
or quarter-hour timezone (like Afghanistan, +0430).
wp-mail.php calculates the timezone by multiplying the timezone offset by
36. This works fine for whole-hour timezones (Pacific Time -0800, -800 *
36 = -28800 seconds). For half-hour and quarter-hour time zones this does
not work (Afghanistan +0430, 430 * 36 = 15480, should be 16200). The
reason this happens is because an hour has 60 minutes as opposed to 100
minutes. 430 / 100 = 4.3 hours, not 4.5 hours. 450 * 36 result in 16200
minutes, but timezones are represented as hours and minutes, not
fractional hours.
This results in posts that are posted via email from a half-hour or
quarter-hour timezone to be posted in the future or in the past from when
it was actually posted.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/16993>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list