Post by sthaesen » Tue Jun 03, 2025 9:49 pm

The field 'date added' is containing incomplete value, both in the confirmation email and in the customer interface. In the admin section, the date is displayed correctly. See screenshots.

From the mail:
Bestelnummer: 235
Datum toegevoegd: 03/06/3

What can I do about this?

Opencart version 4.0.2.3

Attachments

20250603 - opencart Bestelling #235 - data in dashboard.png

20250603 - opencart Bestelling #235 - data in dashboard.png (2.69 KiB) Viewed 1919 times

20250603 - opencart - Bestelling #235 - date is not complete.png

20250603 - opencart - Bestelling #235 - date is not complete.png (4.03 KiB) Viewed 1919 times


New member

Posts

Joined
Fri Jan 05, 2018 6:22 pm

Post by ADD Creative » Tue Jun 03, 2025 11:38 pm

Check the date formats of your language default.php file. Compare them to en-gb.

www.add-creative.co.uk


Guru Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by sthaesen » Wed Jun 04, 2025 1:43 am

Thanks for your reply, but date format would not make it 03/06/3 ... it seems the field is truncated from 03/06/2025 or, like I mention in the subject, it is rounded (in a strange way).

New member

Posts

Joined
Fri Jan 05, 2018 6:22 pm

Post by ADD Creative » Wed Jun 04, 2025 4:59 pm

OpenCart just passes the result of the PHP date function to the template. If that is not at fault then it is likely your theme or an extension.

www.add-creative.co.uk


Guru Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by WaxedPerfection » Wed Jun 04, 2025 10:28 pm

Could be a lower case , UPPER case typo.

The format d/m/y gives two-digit year, which could be the reason you're seeing 03/06/3.

"d/m/Y"
Y = full year (e.g., 2025),
"d/m/y"
y = last two digits of year (e.g., 25)

Example working in English - https://github.com/opencart/opencart/bl ... efault.php

https://www.waxedperfection.co.uk/ Car Detailing Product Blog's and Review's


Active Member

Posts

Joined
Sun Mar 26, 2017 8:23 pm

Post by sthaesen » Thu Jun 05, 2025 1:00 am

Okay, I think I found the problem ... English format is set to 'd/m/Y', Dutch is 'd/m/j'. ... Let's see if I can fix this ;)

New member

Posts

Joined
Fri Jan 05, 2018 6:22 pm

Post by sthaesen » Thu Jun 05, 2025 1:07 am

Thanks both for pointing to this default.php file. I changed the dutch value for Year(Jaar) to 'J' for all date formats and that seems to be working fine. The date is no longer shortened.

New member

Posts

Joined
Fri Jan 05, 2018 6:22 pm
Who is online

Users browsing this forum: No registered users and 0 guests