Page 1 of 1

Khronos Date/Time show up in us-format - how to change that

Posted: Sat Oct 28, 2023 10:03 pm
by janvl
Hi,

i am preparing to use Khronos on one site.

Now i see in the week or day view that Date/Time is with am/pm and dates with the month first.
Is there a way to make Khronos show german dates/times?

I looked through the helptexts and with CMSMSExt but could not find anything.

Thanks in advance,
Jan

Re: Khronos Date/Time show up in us-format - how to change that

Posted: Tue Oct 31, 2023 12:09 pm
by velden
I'd expect this to be formatted in the templates.

Re: Khronos Date/Time show up in us-format - how to change that

Posted: Tue Oct 31, 2023 1:32 pm
by janvl
Hi Velden,

thanks for reacting.

Since the fullcalender-template is bases on fullcalender.io this must be set within the javascrips of fullcalendar as far as i can see.

There is a locale-file for german that is "modules/Khronos/lib/fullcalendar/lang/de.js" i just do not know where and how to transfer to fullcalendar to use the german language-script for the backend.

I could not find a setting within CMSMS-Khronos.

Regards,
Jan

Re: Khronos Date/Time show up in us-format - how to change that

Posted: Tue Oct 31, 2023 3:59 pm
by velden
Yeah I see it's a little messy.

de.js doesn't seem compatible with the version of fullcalendar.io used.
You can fix this by replacing to functions in this file:

a.fullCalendar.datepickerLang --> a.fullCalendar.datepickerLocale
a.fullCalendar.lang --> a.fullCalendar.locale

Then in your Khronos template:

Code: Select all

{xtjs_require cssfile='lib/fullcalendar/fullcalendar.min.css'}
{xtjs_require jsfile='lib/fullcalendar/lib/moment.min.js'}
{xtjs_require jsfile='lib/fullcalendar/fullcalendar.js'}
{xtjs_require jsfile='lib/fullcalendar/lang/de.js'} // <-- ADD THIS LINE
{xtjs_add nominify=1}

Code: Select all

    // monthNames: dateStrings.monthNames,
    // monthNamesShort: dateStrings.monthNamesShort, // <-- COMMENT THIS LINE
    // dayNames: dateStrings.dayNames, // <-- COMMENT THIS LINE
    // dayNamesShort: dateStrings.dayNamesShort, // <-- COMMENT THIS LINE
     firstDay: {$firstdayofweek},
     locale: 'de', // <-- ADD THIS LINE

Re: Khronos Date/Time show up in us-format - how to change that

Posted: Tue Oct 31, 2023 4:05 pm
by janvl
Thanks Velden,

i will make the changes.

Regards,
Jan

Re: Khronos Date/Time show up in us-format - how to change that

Posted: Tue Oct 31, 2023 9:42 pm
by janvl
OK, I made the changes and there is more german now, so that is working.

My point, the time-format in the bachground is still like 4.00 am and 4.00 pm where 04.00 and 16.00 would be more international.
I have no idea where to change that for the weekview or dayview in the full calendar. I did look in the template.

A setting like that would be helpfull, should i make a request for this feature?

Regards,
Jan

Re: Khronos Date/Time show up in us-format - how to change that

Posted: Wed Nov 01, 2023 8:22 am
by velden
I can't confirm the time format you see (in my case it's HH:mm)
That's also the format server by Khronos in the XHR request (checked using the browser's Dev Tools). It's possible you're server is configured differently or your CMSMS global settings are different.

I don't agree with the 'more international' statement btw. That said, in our region it's common to use the 24h clock format.

fullcalendar.io is well documented. It IS possible to change the date and time formats: https://fullcalendar.io/docs/date-formatting
But again, in my case the time is displayed in 24h clock format and I haven't changed a Khronos setting for that.

Re: Khronos Date/Time show up in us-format - how to change that

Posted: Wed Nov 01, 2023 2:23 pm
by janvl
Thanks Velden for the hints.

I will look at the rootserver, i installed minimal ubuntu 22.04 on it and the german locales, afterward ISPConfig, but i will check that.

According to some stackoverflow-entry i should change json.php but could not find it in the Khronos-files

So i will search further.

Regards,
Jan

Re: Khronos Date/Time show up in us-format - how to change that

Posted: Mon Nov 06, 2023 1:43 pm
by janvl
Hi Velden,

i checked the server etc.

Server Locale is
LANG=de_DE.UTF8
LC_TIME="de_DE.UTF-8"
the same is shown in CMSMS

I (still) run PHP 7.4

Any ideas?

Another question, i have sites with an older config.php where for example $config['permissive_smarty'] = true;
is given, in the documentation is says $config['permissive_smarty'] = 1;
Do i have to change that?

Regards,
Jan

Re: Khronos Date/Time show up in us-format - how to change that

Posted: Tue Nov 07, 2023 9:22 am
by velden
Sorry, I'm out of ideas.

You can use the information I posted before. Fullcalendar.io is very flexible but some js skills are needed.
I think it's not the responsibility of the module (Khronos) to take care of display formats.

That said, I don't use the module(s) myself.

Re: Khronos Date/Time show up in us-format - how to change that

Posted: Tue Nov 07, 2023 10:35 am
by janvl
Thank you Velden,

i will search further, i will find it one day ;-)

Regards,
Jan

Re: Khronos Date/Time show up in us-format - how to change that

Posted: Tue Nov 07, 2023 11:03 am
by velden
BTW: did you check the XHR responses which are returned by the module?
There you can see what format the module itself returns.
ss_khronos_01.png

Re: Khronos Date/Time show up in us-format - how to change that

Posted: Tue Nov 07, 2023 5:28 pm
by janvl
Thanks Velden,

with what tool/script did you generate this output, i am no developer.

Regards,
Jan