Page 1 of 2

Default website - change date format?

Posted: Sat 18 Sep 2021 3:22 pm
by rydercowan
Is there a straightforward way to change the date format on the 'Today' and 'Yesterday' default website pages from mm/dd/yyyy to dd/mm/yyyy?

Re: Default website - change date format?

Posted: Sat 18 Sep 2021 9:14 pm
by Phil23
The dates I see on my page is shown as dd/mm/yyyy.
I assumed that is linked to by AU locale.

Only change I've made was to merge yesterday in with today.

https://w2.inverellit.com/today.htm

Phil

Re: Default website - change date format?

Posted: Sun 19 Sep 2021 8:20 am
by rydercowan
Thanks. I'm in Scotland. I'm guessing that there may be a php.ini setting that's causing the US date format to appear on the Today and Yesterday pages, but I can't find anything apart from date.timezone, and that's set to Europe/London. Other pages have dates in non-US format, as dd monthname yyyy for example, so it's not consistent. My knowledge of php is close to zero, so I'm fumbling about in the dark here. There must be some other setting that needs to be changed I suppose.

Re: Default website - change date format?

Posted: Sun 19 Sep 2021 12:22 pm
by water01
I very much doubt it is php.ini since the default website only uses JS and HTML. It is more like you have the wrong Region settings in Windows 10 I would have thought.

Re: Default website - change date format?

Posted: Sun 19 Sep 2021 12:36 pm
by rydercowan
Thanks for that. Win10 region format data was the first thing I checked. All correctly set for UK.

Re: Default website - change date format?

Posted: Sun 19 Sep 2021 1:29 pm
by beteljuice
Are you sure ?
It does look like the (default) W10 short date format.

Take a look at the date in your task bar. Is it the 'right' way round ?

Re: Default website - change date format?

Posted: Sun 19 Sep 2021 2:15 pm
by rydercowan
Yes, I'm sure. Date is displaying in correct format in taskbar.

Re: Default website - change date format?

Posted: Sun 19 Sep 2021 3:12 pm
by freddie
Does it look the same when viewed from another device?

Re: Default website - change date format?

Posted: Sun 19 Sep 2021 3:24 pm
by rydercowan
Yes, I've checked on two PCs and an Android phone. Dates were in US format each time. There must be a parameter setting somewhere which sets the format of the date fields, but I can't find it.

Re: Default website - change date format?

Posted: Sun 19 Sep 2021 3:31 pm
by freddie
Do you have a link to your site? The only parameter I can think of off the top of my head is when you include an alternative locale in the parameters passed to MX at start-up.

Re: Default website - change date format?

Posted: Sun 19 Sep 2021 3:47 pm
by rydercowan
I haven't opened my webserver to the Internet at this stage. Attached are three screenshots as examples showing the US dates.

Re: Default website - change date format?

Posted: Sun 19 Sep 2021 4:48 pm
by mcrossley
The date formats are determined by the locale that MX is running under.

What account are you running MX with, is it the same account that you login to the desktop with, or if you are running it background or as a service are you using a different account?

Re: Default website - change date format?

Posted: Sun 19 Sep 2021 5:06 pm
by rydercowan
I'm running MX as a service under Win10 Pro on a NUC8i5, which is also running Apache and MySQL each as services. I have checked that the regional format settings on the NUC are correctly configured. I might be missing something but can't for the life of me think what it might be. The US format dates show when accessing the website from my desktop and my Android phone, as well as when accessing it on the NUC itself.

Re: Default website - change date format?

Posted: Sun 19 Sep 2021 6:45 pm
by freddie
The first few lines of your MXdiags log file after a restart of MX should show you the locale in use.

Re: Default website - change date format?

Posted: Sun 19 Sep 2021 7:12 pm
by mcrossley
If it is running under a system account as a service, then you need to check the default system locale settings rather than your user settings.

I set both new users and System local to my region - they default to USA.
.
systemlocale.jpg