Support » Plugin: GiveWP - Donation Plugin and Fundraising Platform » Fatal Error Unknown or bad timezone (America/Los_Angeles)

  • Resolved alangarcia88


    Hi! I’m trying to test the plugin but after install I get the fatal error: Uncaught Exception: DateTimeZone::__construct(): Unknown or bad timezone (America/Los_Angeles) in /home/meusite/public_html/wp-content/plugins/give/src/Promotions/InPluginUpsells/SaleBanners.php:78 Stack trace: #0 /home/meusite/public_html/wp-content/plugins/give/src/Promotions/InPluginUpsells/SaleBanners.php(78): DateTimeZone->__construct() #1 /home/meusite/public_html/wp-content/plugins/give/src/Promotions/InPluginUpsells/SaleBanners.php(121): Give\Promotions\InPluginUpsells\SaleBanners->getVisibleBanners() #2 [internal function]: Give\Promotions\InPluginUpsells\SaleBanners->render() #3 /home/meusite/public_html/wp-content/plugins/give/src/Helpers/Hooks.php(43): call_user_func_array() #4 /home/meusite/public_html/wp-includes/class-wp-hook.php(308): Give\Helpers\Hooks::Give\Helpers{closure}() #5 /home/meusite/public_html/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters() #6 /home/meusite/public_html/wp-includes/plugin.php(517): WP_Hook->do_action() #7 /home/meusite/public_html/wp-admin/admin-header.php(303): do_action() #8 /home/meusite/public_html/wp-admin/admin.php(239): require_once(‘…’) #9 /home/meusite/public_html/wp-admin/edit.php(10): require_once(‘…’) #10 {main} thrown in /home/meusite/public_html/wp-content/plugins/give/src/Promotions/InPluginUpsells/SaleBanners.php on line 78

    No Ideia of how to fix it.

    My php version is 8.1.2, Time zone: America/Sao_Paulo (-03, -0300)

    Thank you

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor Ben Meredith


    Hi @alangarcia88

    That’s certainly not what we want! I just attempted to replicate what you are seeing on a test install of mine, and so far I’ve not been able to:

    Here’s what I tried:

    1. Create a test site with the latest GiveWP on it (2.31.0)
    2. Change the timezone to America/Los_Angeles per the error message.
    3. Change the timezone to America/Sao_Paulo per your coment.
    4. Turn on WP_DEBUG mode
    5. Upgraded my PHP version to 8.1.x

    So far, I’ve not been able to replicate the issue at all. It’s possible that something in a third party plugin or the theme is also trying to do something having to do with timezones. Can you temporarily deactivate all other plugins and see if the problem goes away, or switch to a different theme temporarily?

    I’m eager to get this resolved for you, but until I can replicate the problem I’m a bit stuck.

    Thread Starter alangarcia88


    Hi! ty for your answer. I tried in another server and php version, a fresh WP and it worked. About the error on the other server, I just cant understand where this “America/Los_Angeles” came from, because my server and WP is set to America/Sao_Paulo. I’ll need to figure this out.

    Thank you.

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.