Closed benlk closed 6 years ago
Timezones are not a specific GMT offset; we need a GMT offset for this. A better approach is described in https://github.com/npr/nprapi-wordpress/pull/53 that makes use of WordPress's tools for converting timezones to GMT offsets.
TODO: Up to 2 hours for remaining testing for #53 .
Automated tests for #53 pass.
Human-run tests for #53 should perform the following tasks:
When the
'gmt_offset'
value is a number (which is pretty much everywhen), the DateTimeZone constructor complains that the number is not a valid timezone.https://github.com/npr/nprapi-wordpress/blob/853a3011aafa9727a8742111305ff3194abca236/push_story.php#L676-L679
'timezone_string'
when'gmt_offset'
is unset, in functionnprstory_get_post_expiry_datetime()
and in functionnprstory_save_datetime()
nprstory_get_post_expiry_datetime( $post )
with every valid GMT offset and with every time zone and with nothing set for either.