You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 26, 2021. It is now read-only.
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.
PHP Fatal Error: Uncaught exception 'Exception' with message 'DateTimeZone::__construct(): Unknown or bad timezone (-4)' in /plugins/npr-story-api/psuh_story.php:676'
provide fallback behavior for when those meta are not set
add test case that runs nprstory_get_post_expiry_datetime( $post ) with every valid GMT offset and with every time zone and with nothing set for either.
Timezones are not a specific GMT offset; we need a GMT offset for this. A better approach is described in #53 that makes use of WordPress's tools for converting timezones to GMT offsets.
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.nprapi-wordpress/push_story.php
Lines 676 to 679 in 853a301
'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.The text was updated successfully, but these errors were encountered: