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. Discuss
  3. "Default" way to change timezone?

"Default" way to change timezone?

Scheduled Pinned Locked Moved Discuss
12 Posts 5 Posters 928 Views 5 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.
  • M Offline
    M Offline
    malvim
    wrote on last edited by
    #3

    Yeah, I looked into that, but that's for the cloudron system itself. Backup and update tasks. Host machine and app containers still use UTC.

    1 Reply Last reply
    0
    • nebulonN Offline
      nebulonN Offline
      nebulon
      Staff
      wrote on last edited by
      #4

      The host machine and servers generally are best to be run in UTC since they possibly serve users in various timezones. The apps itself, like the Cloudron dashboard and such should then translate from UTC to the local timezone (and locale formats) based on the user setting or browser profiles.

      1 Reply Last reply
      0
      • M Offline
        M Offline
        malvim
        wrote on last edited by
        #5

        Yeah, I understand and that makes sense. Scheduled jobs are the only case in which this is kind of annoying, right? Since the container should still run in UTC, but then we should account for it when scheduling our jobs.

        Maybe I'll just find another way to schedule the jobs, since a few of them need to be run in a specific time of day (on my TZ). I guess this would be the preferred approach? Because even if I account for the difference in hours and schedule them in UTC time, there's all kinds of specifics like daylight savings and the like that would make it kind of a nightmare...

        Thanks anyway for the answers

        1 Reply Last reply
        0
        • nebulonN Offline
          nebulonN Offline
          nebulon
          Staff
          wrote on last edited by
          #6

          In this case you want to set the timezone via the dashboard as mentioned in https://docs.cloudron.io/settings/#system-time-zone

          This will not change the system timezone but will take the setting into account when scheduling the jobs

          1 Reply Last reply
          1
          • M Offline
            M Offline
            malvim
            wrote on last edited by
            #7

            Thanks for your help, @nebulon, but it seems that's not how it works. At least not on my cloudron.
            I'm using a LAMP app, and the "Cron" item on its config page.

            This is how it looks:

            # +------------------------ minute (0 - 59)
            # |    +------------------- hour (0 - 23)
            # |    |    +-------------- day of month (1 - 31)
            # |    |    |    +--------- month (1 - 12)
            # |    |    |    |    +---- day of week (0 - 6) (Sunday=0 or 7)
            # |    |    |    |    |
            # *    *    *    *    * command to be executed
            # * 7,8 * * 1-5  /app/data/latest/main.sh >> /app/data/app.log
            

            It should fire at 7am and then again at 8am, on weekdays. And it's working, but it's 7 and 8am UTC, not on my timezone. And I've changed cloudron's system timezone to my local time.

            1 Reply Last reply
            0
            • nebulonN Offline
              nebulonN Offline
              nebulon
              Staff
              wrote on last edited by
              #8

              You are right, just checked the code at https://git.cloudron.io/platform/box/-/blob/master/src/scheduler.js?ref_type=heads#L84 which sets up the cron job for the app. That does not specify the timezone, so it runs in UTC. In fact even our docs at https://docs.cloudron.io/apps/#cron mention this aspect correctly.

              I confused the usage here myself, where the timezone only affects selected cron jobs like autoupdate and backups

              1 Reply Last reply
              3
              • d19dotcaD Offline
                d19dotcaD Offline
                d19dotca
                wrote on last edited by
                #9

                It would be nice to have these times converted to the local time zone. When we set a timezone in Cloudron there shouldn't (in my opinion) be a need to still use UTC-0 when setting crons in Cloudron.

                --
                Dustin Dauncey
                www.d19.ca

                1 Reply Last reply
                2
                • girishG Offline
                  girishG Offline
                  girish
                  Staff
                  wrote on last edited by
                  #10

                  I like the idea of having the cron jobs run in user time zone. It doesn't affect any of our packaging cron jobs since they are all periodic. Can look into changing this.

                  1 Reply Last reply
                  4
                  • M Offline
                    M Offline
                    malvim
                    wrote on last edited by
                    #11

                    @girish that would be nice, and it seems to me to be more "natural" to a user, like @d19dotca mentioned. Thanks for taking a look at this!

                    1 Reply Last reply
                    1
                    • girishG Offline
                      girishG Offline
                      girish
                      Staff
                      wrote on last edited by
                      #12

                      I have fixed this for the new release

                      1 Reply Last reply
                      4
                      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