Elxis CMS Forum

Support => Installation => Topic started by: oisy on April 03, 2015, 12:18:27

Title: Problem with exp. date in user profil
Post by: oisy on April 03, 2015, 12:18:27
Hi,
I just update to new 4.3, and as described in Readme I log in and have to change the password.
The problem is - at profil at the bottom I have date of expiration when I write a date the site sad - Invalid date format. (I input date format line day-month-year 03.03.2022
How can I repair this?
Title: Re: Problem with exp. date in user profil
Post by: datahell on April 03, 2015, 12:41:00
The proper date format for date/datetime input boxes is language specific.

For the English language the proper format is:

d-m-Y (for date only inputs, example: 03-04-2015)
and
d-m-Y H:i:s (for date and time inputs, example: 03-04-2015 12:40:55)

If you click the calendar icon next to the input box you can pick a date from the calendar and it will insert automatically the selected date with the correct format.

Note: Elxis displays date and time in your local timezone. If you provide a datetime then it is for your local timezone. Elxis internally converts your dates into GMT and saves them into database as GMT. For example if I have picked Europe/Athens timezone and I set time to 12:43:10, which is my local time, then Elxis will save it as 09:43:10 because it will save it in GMT timezone (Greece time = GMT+2 hours + 1 hour for summer time). If a user from Berlin login he will see that time as 11:43:10 (Germany time = GMT+1 hour + 1 hour for summer time). Elxis is very smart and user-friendly when handles dates.
Title: Re: Problem with exp. date in user profil
Post by: oisy on April 03, 2015, 12:52:23
Thanks, IT work when I switch to English language, but doesn't work in Bulgarian language.
Title: Re: Problem with exp. date in user profil
Post by: datahell on April 03, 2015, 13:50:51
There is something wrong in Bulgarian language files.

Open file language/bg/bg.php with a text editor such as pspad.

Change:
$_lang['DATE_FORMAT_BOX'] = 'д-м-Г'; //supported formats: d-m-Y, Y-m-d, d/m/Y, Y/m/d
$_lang['DATE_FORMAT_BOX_LONG'] = 'д-м-Г Ч:м:с'; //supported formats: d-m-Y H:i:s, Y-m-d H:i:s, d/m/Y H:i:s, Y/m/d H:i:s
To:
$_lang['DATE_FORMAT_BOX'] = 'd-m-Y'; //supported formats: d-m-Y, Y-m-d, d/m/Y, Y/m/d
$_lang['DATE_FORMAT_BOX_LONG'] = 'd-m-Y H:i:s'; //supported formats: d-m-Y H:i:s, Y-m-d H:i:s, d/m/Y H:i:s, Y/m/d H:i:s

Save the file and it will work fine for Bulgarian language too.