Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. Castopod
  3. Scheduling a episode gives an error

Scheduling a episode gives an error

Scheduled Pinned Locked Moved Solved Castopod
9 Posts 2 Posters 149 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    superhua
    wrote last edited by superhua
    #1

    I get this error when trying to a schedule a podcast episode (I deleted my city):

    DateInvalidTimeZoneException
    DateTimeZone::__construct(): Unknown or bad timezone (America/CityDeleted)
    at /app/code/vendor/codeigniter4/framework/system/I18n/TimeTrait.php:92
    

    When I copy the stack trace:

    DateInvalidTimeZoneException: DateTimeZone::__construct(): Unknown or bad timezone (America/CityDeleted) in /app/code/vendor/codeigniter4/framework/system/I18n/TimeTrait.php:92
    Stack trace:
    #0 /app/code/vendor/codeigniter4/framework/system/I18n/TimeTrait.php(92): DateTimeZone->__construct()
    #1 /app/code/vendor/codeigniter4/framework/system/I18n/TimeTrait.php(256): CodeIgniter\I18n\Time->__construct()
    #2 /app/code/modules/Admin/Controllers/EpisodeController.php(497): CodeIgniter\I18n\Time::createFromFormat()
    #3 /app/code/modules/Admin/Controllers/EpisodeController.php(64): Modules\Admin\Controllers\EpisodeController->attemptPublish()
    #4 /app/code/vendor/codeigniter4/framework/system/CodeIgniter.php(932): Modules\Admin\Controllers\EpisodeController->_remap()
    #5 /app/code/vendor/codeigniter4/framework/system/CodeIgniter.php(509): CodeIgniter\CodeIgniter->runController()
    #6 /app/code/vendor/codeigniter4/framework/system/CodeIgniter.php(355): CodeIgniter\CodeIgniter->handleRequest()
    #7 /app/code/vendor/codeigniter4/framework/system/Boot.php(334): CodeIgniter\CodeIgniter->run()
    #8 /app/code/vendor/codeigniter4/framework/system/Boot.php(67): CodeIgniter\Boot::runCodeIgniter()
    #9 /app/code/public/index.php(61): CodeIgniter\Boot::bootWeb()
    #10 {main}
    

    This happens both on the Cloudron demo server and my server.

    Is this an upstream issue?

    jamesJ 1 Reply Last reply
    0
    • jamesJ Offline
      jamesJ Offline
      james
      Staff
      wrote last edited by james
      #6

      I did a comparison what timezone on Linux exist for America and compared them to the list of supported timezones in https://www.php.net/manual/en/timezones.america.php

      Comparison can be found here: https://regex101.com/r/mXRK1J/1
      Not supported timezones are:

      [...]
      America/Ensenada
      America/Fort_Wayne
      [...]
      

      Setting my timezone to America/Fort_Wayne:

      timedatectl
      Local time: Mi 2025-05-28 02:04:21 EDT
      Universal time: Mi 2025-05-28 06:04:21 UTC
      RTC time: Mi 2025-05-28 06:04:20
      Time zone: America/Fort_Wayne (EDT, -0400)
      System clock synchronized: no
      NTP service: inactive
      RTC in local TZ: no
      

      In a Chrome based Browser running:

      console.log(Intl.DateTimeFormat().resolvedOptions().timeZone);
      America/Indianapolis
      

      Good America/Indianapolis is not on the list https://www.php.net/manual/en/timezones.america.php

      5d09d938-1c3e-42e7-bbdd-3345c3c71d90-image.png

      DateInvalidTimeZoneException: DateTimeZone::__construct(): Unknown or bad timezone (America/Indianapolis) in /app/code/vendor/codeigniter4/framework/system/I18n/TimeTrait.php:92
      Stack trace:
      #0 /app/code/vendor/codeigniter4/framework/system/I18n/TimeTrait.php(92): DateTimeZone->__construct()
      #1 /app/code/vendor/codeigniter4/framework/system/I18n/TimeTrait.php(256): CodeIgniter\I18n\Time->__construct()
      #2 /app/code/modules/Admin/Controllers/PodcastController.php(697): CodeIgniter\I18n\Time::createFromFormat()
      #3 /app/code/modules/Admin/Controllers/PodcastController.php(53): Modules\Admin\Controllers\PodcastController->attemptPublish()
      #4 /app/code/vendor/codeigniter4/framework/system/CodeIgniter.php(932): Modules\Admin\Controllers\PodcastController->_remap()
      #5 /app/code/vendor/codeigniter4/framework/system/CodeIgniter.php(509): CodeIgniter\CodeIgniter->runController()
      #6 /app/code/vendor/codeigniter4/framework/system/CodeIgniter.php(355): CodeIgniter\CodeIgniter->handleRequest()
      #7 /app/code/vendor/codeigniter4/framework/system/Boot.php(334): CodeIgniter\CodeIgniter->run()
      #8 /app/code/vendor/codeigniter4/framework/system/Boot.php(67): CodeIgniter\Boot::runCodeIgniter()
      #9 /app/code/public/index.php(61): CodeIgniter\Boot::bootWeb()
      #10 {main}
      

      This is the exact error you are having.

      Now in FireFox running:

      console.log(Intl.DateTimeFormat().resolvedOptions().timeZone);
      America/Indiana/Indianapolis
      

      America/Indiana/Indianapolis is on the list of supported timezone https://www.php.net/manual/en/timezones.america.php

      And the scedule publish of castopod worked fine.


      Solution / Error explanation

      It seems your are using a Chrome based Browser on a Unix based system (macOS / Linux) and a Timezone that gets converted into a TimeZone that is not support by PHP.

      Quick Fix

      Use a different timezone that is more generic and check in the web console with:

      console.log(Intl.DateTimeFormat().resolvedOptions().timeZone);
      

      if the timezone returned is avaiable in https://www.php.net/manual/en/timezones.america.php

      What should be done in a perfect world

      An issue should be raised with PHP and the Chomerium based browser you are using about this specific issue and Timezone.
      Either PHP should support all timezone or the chrome based browser should convert it into a supported PHP version one like FireFox does.

      I hope this will solve your issue.

      1 Reply Last reply
      3
      • S superhua

        I get this error when trying to a schedule a podcast episode (I deleted my city):

        DateInvalidTimeZoneException
        DateTimeZone::__construct(): Unknown or bad timezone (America/CityDeleted)
        at /app/code/vendor/codeigniter4/framework/system/I18n/TimeTrait.php:92
        

        When I copy the stack trace:

        DateInvalidTimeZoneException: DateTimeZone::__construct(): Unknown or bad timezone (America/CityDeleted) in /app/code/vendor/codeigniter4/framework/system/I18n/TimeTrait.php:92
        Stack trace:
        #0 /app/code/vendor/codeigniter4/framework/system/I18n/TimeTrait.php(92): DateTimeZone->__construct()
        #1 /app/code/vendor/codeigniter4/framework/system/I18n/TimeTrait.php(256): CodeIgniter\I18n\Time->__construct()
        #2 /app/code/modules/Admin/Controllers/EpisodeController.php(497): CodeIgniter\I18n\Time::createFromFormat()
        #3 /app/code/modules/Admin/Controllers/EpisodeController.php(64): Modules\Admin\Controllers\EpisodeController->attemptPublish()
        #4 /app/code/vendor/codeigniter4/framework/system/CodeIgniter.php(932): Modules\Admin\Controllers\EpisodeController->_remap()
        #5 /app/code/vendor/codeigniter4/framework/system/CodeIgniter.php(509): CodeIgniter\CodeIgniter->runController()
        #6 /app/code/vendor/codeigniter4/framework/system/CodeIgniter.php(355): CodeIgniter\CodeIgniter->handleRequest()
        #7 /app/code/vendor/codeigniter4/framework/system/Boot.php(334): CodeIgniter\CodeIgniter->run()
        #8 /app/code/vendor/codeigniter4/framework/system/Boot.php(67): CodeIgniter\Boot::runCodeIgniter()
        #9 /app/code/public/index.php(61): CodeIgniter\Boot::bootWeb()
        #10 {main}
        

        This happens both on the Cloudron demo server and my server.

        Is this an upstream issue?

        jamesJ Offline
        jamesJ Offline
        james
        Staff
        wrote last edited by james
        #2

        Hello @superhua
        This php error is saying that the timezone you have used is not supported and thus throwing this error.

        Error: https://www.php.net/manual/en/class.dateinvalidtimezoneexception.php
        Thrown when an incorrect value is passed to DateTimeZone::__construct().
        => https://www.php.net/manual/en/datetimezone.construct.php

        From the parameter timezone:

        One of the supported timezone names, an offset value (+0200), or a timezone abbreviation (BST).

        https://www.php.net/manual/en/timezones.php

        Please check if your city is even in the support timezone names and report back.

        If this is truly the error, this might be something for upstream for better error handling in the UI to inform the User that the given timezone is not supported.

        Not seen an issue about this in the official issue tracker for castopod https://code.castopod.org/adaures/castopod/-/issues/

        1 Reply Last reply
        1
        • S Offline
          S Offline
          superhua
          wrote last edited by
          #3

          Thank you.

          My city is in the support timezone.

          Further, I don't see a place to specify a timezone. That is, I think Castopod is automatically assigning the timezone.

          1 Reply Last reply
          1
          • jamesJ Offline
            jamesJ Offline
            james
            Staff
            wrote last edited by
            #4

            Hello @superhua
            I will look into it.

            1 Reply Last reply
            1
            • jamesJ Offline
              jamesJ Offline
              james
              Staff
              wrote last edited by james
              #5

              After looking into the code of castopod I can see that the timezone is taken from the browser directly. There is no place to configure this, only on the local system level.

              Some testing:
              Windows 11, setting the Timezone to (UTC-04:00) Georgetown, La Paz, Manaus, San Juan since this timezone also includes a _ character for extra measure.
              In a Chrome based browser I validated the timezone in the console and tried to schedule publish a podcast.

              console.log(Intl.DateTimeFormat().resolvedOptions().timeZone);
              America/La_Paz
              

              bbf0971c-609e-45b1-8b51-84fbd8d5ae31-image.png

              May 28 01:45:58 2a02:8109:abb5:7100:a141:da1d:5d:6aa - - [28/May/2025:05:45:58 +0000] "POST /cp-admin/podcasts/1/publish HTTP/1.1" 303 - "https://org.castopod.cloudronapp.cloudron.dev/cp-admin/podcasts/1/publish" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36"
              May 28 01:45:58 2a02:8109:abb5:7100:a141:da1d:5d:6aa - - [28/May/2025:05:45:58 +0000] "GET /cp-admin/podcasts/1 HTTP/1.1" 200 6432 "https://org.castopod.cloudronapp.cloudron.dev/cp-admin/podcasts/1/publish" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36"
              May 28 01:45:58 2a02:8109:abb5:7100:a141:da1d:5d:6aa - - [28/May/2025:05:45:58 +0000] "GET /media/podcasts/EEEEE/cover_thumbnail.webp HTTP/1.1" 304 - "https://org.castopod.cloudronapp.cloudron.dev/cp-admin/podcasts/1" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36"
              May 28 01:45:58 2a02:8109:abb5:7100:a141:da1d:5d:6aa - - [28/May/2025:05:45:58 +0000] "GET /themes/colors HTTP/1.1" 200 588 "https://org.castopod.cloudronapp.cloudron.dev/cp-admin/podcasts/1" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36"
              May 28 01:45:58 2a02:8109:abb5:7100:a141:da1d:5d:6aa - - [28/May/2025:05:45:58 +0000] "GET /media/podcasts/EEEEE/cover_federation.png HTTP/1.1" 304 - "https://org.castopod.cloudronapp.cloudron.dev/cp-admin/podcasts/1" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36"
              May 28 01:45:59 2a02:8109:abb5:7100:a141:da1d:5d:6aa - - [28/May/2025:05:45:59 +0000] "GET /manifest.webmanifest HTTP/1.1" 200 545 "https://org.castopod.cloudronapp.cloudron.dev/cp-admin/podcasts/1" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36"
              May 28 01:46:00 2a02:8109:abb5:7100:a141:da1d:5d:6aa - - [28/May/2025:05:46:00 +0000] "GET /sw.js HTTP/1.1" 200 1058 "https://org.castopod.cloudronapp.cloudron.dev/sw.js" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36
              
              draft mode
              This podcast is scheduled for publication on Friday, May 30, 2025 at 12:00 PM
              

              This seems to be working.

              Testing a Linux Client.

              1 Reply Last reply
              2
              • jamesJ Offline
                jamesJ Offline
                james
                Staff
                wrote last edited by james
                #6

                I did a comparison what timezone on Linux exist for America and compared them to the list of supported timezones in https://www.php.net/manual/en/timezones.america.php

                Comparison can be found here: https://regex101.com/r/mXRK1J/1
                Not supported timezones are:

                [...]
                America/Ensenada
                America/Fort_Wayne
                [...]
                

                Setting my timezone to America/Fort_Wayne:

                timedatectl
                Local time: Mi 2025-05-28 02:04:21 EDT
                Universal time: Mi 2025-05-28 06:04:21 UTC
                RTC time: Mi 2025-05-28 06:04:20
                Time zone: America/Fort_Wayne (EDT, -0400)
                System clock synchronized: no
                NTP service: inactive
                RTC in local TZ: no
                

                In a Chrome based Browser running:

                console.log(Intl.DateTimeFormat().resolvedOptions().timeZone);
                America/Indianapolis
                

                Good America/Indianapolis is not on the list https://www.php.net/manual/en/timezones.america.php

                5d09d938-1c3e-42e7-bbdd-3345c3c71d90-image.png

                DateInvalidTimeZoneException: DateTimeZone::__construct(): Unknown or bad timezone (America/Indianapolis) in /app/code/vendor/codeigniter4/framework/system/I18n/TimeTrait.php:92
                Stack trace:
                #0 /app/code/vendor/codeigniter4/framework/system/I18n/TimeTrait.php(92): DateTimeZone->__construct()
                #1 /app/code/vendor/codeigniter4/framework/system/I18n/TimeTrait.php(256): CodeIgniter\I18n\Time->__construct()
                #2 /app/code/modules/Admin/Controllers/PodcastController.php(697): CodeIgniter\I18n\Time::createFromFormat()
                #3 /app/code/modules/Admin/Controllers/PodcastController.php(53): Modules\Admin\Controllers\PodcastController->attemptPublish()
                #4 /app/code/vendor/codeigniter4/framework/system/CodeIgniter.php(932): Modules\Admin\Controllers\PodcastController->_remap()
                #5 /app/code/vendor/codeigniter4/framework/system/CodeIgniter.php(509): CodeIgniter\CodeIgniter->runController()
                #6 /app/code/vendor/codeigniter4/framework/system/CodeIgniter.php(355): CodeIgniter\CodeIgniter->handleRequest()
                #7 /app/code/vendor/codeigniter4/framework/system/Boot.php(334): CodeIgniter\CodeIgniter->run()
                #8 /app/code/vendor/codeigniter4/framework/system/Boot.php(67): CodeIgniter\Boot::runCodeIgniter()
                #9 /app/code/public/index.php(61): CodeIgniter\Boot::bootWeb()
                #10 {main}
                

                This is the exact error you are having.

                Now in FireFox running:

                console.log(Intl.DateTimeFormat().resolvedOptions().timeZone);
                America/Indiana/Indianapolis
                

                America/Indiana/Indianapolis is on the list of supported timezone https://www.php.net/manual/en/timezones.america.php

                And the scedule publish of castopod worked fine.


                Solution / Error explanation

                It seems your are using a Chrome based Browser on a Unix based system (macOS / Linux) and a Timezone that gets converted into a TimeZone that is not support by PHP.

                Quick Fix

                Use a different timezone that is more generic and check in the web console with:

                console.log(Intl.DateTimeFormat().resolvedOptions().timeZone);
                

                if the timezone returned is avaiable in https://www.php.net/manual/en/timezones.america.php

                What should be done in a perfect world

                An issue should be raised with PHP and the Chomerium based browser you are using about this specific issue and Timezone.
                Either PHP should support all timezone or the chrome based browser should convert it into a supported PHP version one like FireFox does.

                I hope this will solve your issue.

                1 Reply Last reply
                3
                • S Offline
                  S Offline
                  superhua
                  wrote last edited by
                  #7

                  Thank you for your in-depth research and description!

                  1 Reply Last reply
                  1
                  • jamesJ Offline
                    jamesJ Offline
                    james
                    Staff
                    wrote last edited by
                    #8

                    Hello @superhua

                    Happy to help. Is this now solved from your point of view?

                    1 Reply Last reply
                    0
                    • S Offline
                      S Offline
                      superhua
                      wrote last edited by
                      #9

                      Yes; thank you.

                      1 Reply Last reply
                      1
                      • S superhua marked this topic as a question
                      • S superhua has marked this topic as solved
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • Bookmarks
                      • Search