We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 39961
    • 25 Posts
    Hi
    One of my sites has suddenly decided to start displaying dates in Russian; just the dates, nothing else. Anyone got any ideas what could be causing it?

    URL: http://northdevonwheelers.com/calendar.html

    The dates are formatted in a snippet nothing particularly strange here:
    [[+thedate:strtotime:date=`%B - %y`:isnot=`[[+oldmonth]]`:then=`
    </div><div class="month">
    <h3>[[+thedate:strtotime:date=`%B`]]</h3>
    `:else=``]]
    [[setPlaceholder? &placeholder=`oldmonth` &value=`[[+thedate:strtotime:date=`%B - %y`]]`]]
    <p class="[[+type]]">
    [[!If? &subject=`[[+link]]` &operator=`!empty` &then=`<a href="[[+link]]" target="_blank">` ]]
    <strong>[[+thedate:strtotime:date=`%a %d-%b`]] : [[+title]]</strong> | [[+location]]
    [[!If? &subject=`[[+link]]` &operator=`!empty` &then=`</a>` ]]
    </p>


    It's been working for about a year and just suddenly turned to this.
    Help or suggestions very welcome!
    Gareth
      • 38783
      • 571 Posts
      Any changes made to the server configuration by the hosting company recently?
        If I help you out on these forums I would be very grateful if you would consider rating me on Trustpilot: https://uk.trustpilot.com/review/andytough.com

        email: [email protected] | website: https://andytough.com
        • 39961
        • 25 Posts
        That's what I thought but they don't think there is. It strange how it's just the dates.
          • 38783
          • 571 Posts
          How do you enter the event dates into the system? Are they entered directly into the MODX manager, or are they called in from an outside source, like a Google calendar?
            If I help you out on these forums I would be very grateful if you would consider rating me on Trustpilot: https://uk.trustpilot.com/review/andytough.com

            email: [email protected] | website: https://andytough.com
            • 39961
            • 25 Posts
            Hi Andy
            They are going in via MIGX the format is fine it seems to just be the way MODX is handling the output?!

              • 39961
              • 25 Posts
              Right, I've come to the conclusion that it is definitely the date output modifier (sorry if I'm using the wrong term here) that is doing this - if I output the date as a MIGX raw value they are fine e.g. 2018-04-12 18:30:00
                • 39961
                • 25 Posts
                I've managed to fix this but I'm not happy as I haven't got to the bottom of the issue!

                I have forced the setlocale in a snippet at the top of my pages.

                date_default_timezone_set('Europe/London');
                setlocale(LC_ALL, array('en_GB.UTF8','en_GB@euro','en_GB','english'));


                Oh well, works now!
                  • 38783
                  • 571 Posts
                  Glad it is working again. There is a discussion about this here:
                  https://forums.modx.com/thread/86071/locales-and-strtotime
                  Bobs answer 6 might be the solution?
                  Doesn't explain why it suddenly changed though.
                    If I help you out on these forums I would be very grateful if you would consider rating me on Trustpilot: https://uk.trustpilot.com/review/andytough.com

                    email: [email protected] | website: https://andytough.com
                    • 39961
                    • 25 Posts
                    Hi Andy
                    Thanks for your help/input on this - I have just got rid of 'my' fix as I have set the locale system setting to 'en_GB' and that works fine; there was no value in here before so I guess it was defaulting to Russian - why it would default to Russian is beyond me!
                    Gareth
                      • 38783
                      • 571 Posts
                      I suspect the hosting company may have had a part to play in it! Glad it is sorted.
                        If I help you out on these forums I would be very grateful if you would consider rating me on Trustpilot: https://uk.trustpilot.com/review/andytough.com

                        email: [email protected] | website: https://andytough.com