We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 32025
    • 305 Posts
    I am having an issue with the calendar sometimes displaying incorrectly in the admin. The incorrect display shows certain events as being 1 day later, if and only if, the event is posted after 9PM (our Eastern Standard time). The front end does display properly.

    I found another post referring to the dates being off by one date here: http://forums.modx.com/thread/77927/upcoming-events-appear-on-wrong-date#dis-post-448901

    Although I have a slightly different issue. When I create an event in my calendar (v.1.1.6) and add a time and date everything seems to work fine. Except when I make the start time after 9PM the event shows in the admin panel as the next day. On the front end it shows on the correct date, and the date fields are correct, it only shows in the admin view page as the day later. Since I experimented with different times and it worked fine before 9PM, I am thinking the calendars multiple view area in the admin, seems to be on Pacific time (and we are on the Eastern time). I suspect this because the admin multiple view date is exactly 4 hours off in the evening. However, if I change the start date to the beginning or 12AM the date is still correct.

    Once again this does not affect the front end that the visitors see, its only in the admin panel, but we have many entries and these incorrect dates make it difficult to organize our events.

    Anyone know how I can correct this admin date area only?

    This question has been answered by wshawn. See the first response.

    [ed. note: charless last edited this post 10 years, 9 months ago.]
      Making the web a better place on site at a time! Dayton Web Design: http://www.dayton-web-design.com/
    • discuss.answer
      Check your date_timezone System Setting. Mine is empty and ran from the php.ini setting.

      I have seen your issue when php5.3 is running one side of the site and another php version is running the other.

      Also local .htaccess or php.ini files may change the date.timezone setting in those files, make sure you don't have a rogue file redefining it.
        Get your copy of MODX Revolution Building the Web Your Way http://www.sanitypress.com/books/modx-revolution-building-the-web-your-way.html

        Check out my MODX || xPDO resources here: http://www.shawnwilkerson.com
        • 32025
        • 305 Posts
        OK the date_timezone in system settings was blank. So I am assuming this value is taken from the server php.ini and that time is 3 hours behind EST (-8 GMT). So this might be the problem.

        What type of value can I put into the date_timezone to display EST (-5 GMT)? I just do not know what type of value and format MODx wants for this setting. According to another post I see this: "America/New_York" Can I use this for the value?
          Making the web a better place on site at a time! Dayton Web Design: http://www.dayton-web-design.com/
          • 32025
          • 305 Posts
          Thank you. I set the: date_timezone to a value of: America/New_York and the time issue seems to be resolved. Apparently the server PHP time setting was the issue, so this setting seemed to correct the problem.
            Making the web a better place on site at a time! Dayton Web Design: http://www.dayton-web-design.com/
          • Can you mark this as answered.
              Get your copy of MODX Revolution Building the Web Your Way http://www.sanitypress.com/books/modx-revolution-building-the-web-your-way.html

              Check out my MODX || xPDO resources here: http://www.shawnwilkerson.com
              • 32025
              • 305 Posts
              I don't see a mark as answered. I see the WSYSIWYG box that I typed this into (no answered) there is a preview, reply, reply to thread, mark as unread, reply with quote, modify, remove, subscribe rss, and stop e-mails. I then tried to reply to see if the mark as answered showed and I just do not see it.

              Is this answered button hidden somewhere?
                Making the web a better place on site at a time! Dayton Web Design: http://www.dayton-web-design.com/
              • just fyi that I change to question post and flagged the answer; thanks Shawn
                  Evo Revo // Ubuntu, CentOS, Win // Apache 2x, Lighttp (Lighty)
                  Visit CharlesMx.com for latest news and status updates.
                • If a timezone is not set, PHP will try to use the server's timezone setting. Since a site can be hosted on servers anywhere in the world, even if the server has such a setting it's probably not going to be very useful to use that setting.

                  As far as marking a question as answered, there is a little star in the upper right corner of each post, and the one you click will be marked as the answer.
                    Studying MODX in the desert - http://sottwell.com
                    Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                    Join the Slack Community - http://modx.org