open: admin/controller/sale/order.php
find:
change to:
find:
Code: Select all
'date_added' => date($this->language->get('date_format_short'), strtotime($result['date_added'])),
Code: Select all
'date_added' => date($this->language->get('date_format_short'), strtotime($result['date_added'])).' '.date($this->language->get('time_format'), strtotime($result['date_added'])),
Kudos to you!uksitebuilder wrote:open: admin/controller/sale/order.php
find:......Code: Select all
'date_added' => date($this->language->get('date_format_short'), strtotime($result['date_added'])),
However, my server time and my local time is having a 15 hours difference. How can I make it to show the time in my local timezone?
I read the post about Setting Local Timezone values in database. I am not sure if I get the meaning wrong but I do not want to change the time in the MySQL database (what if I decided to change the host, and the server is at another time zone again, and that will mess up the time recorded... btw, i haven't check if the database recorded the time in unix timestamp).
I just want to have the local time display on the webpage, which probably is as stated in this post.
Someone did this, and I read this blog post too regarding the changes needed to show the local date for specials and discounts feature.
I don't know which approach is the best. Probably you can give suggestions and solutions on this if it is not too much of works.
Thank you in advance.
----------------------------
Edit to add:
Never mind, I decided to use the method showing in Setting Local Timezone values in database.
Last edited by joy on Mon Oct 17, 2011 10:21 pm, edited 1 time in total.
OC version 1.5.1.3
Thanx, useful modification!uksitebuilder wrote:open: admin/controller/sale/order.php
change to:Code: Select all
'date_added' => date($this->language->get('date_format_short'), strtotime($result['date_added'])).' '.date($this->language->get('time_format'), strtotime($result['date_added'])),
How does the string look like for an 24 hour notation?
OC version 1.5.4.1
You can change the format at admin/language/english/english.phpmarkman-b wrote: How does the string look like for an 24 hour notation?
e.g. From h:i:s A = 08:05:13 PM to H:i:s = 20:05:13
change:
Code: Select all
$_['time_format'] = 'h:i:s A';
Code: Select all
$_['time_format'] = 'H:i:s';
OC version 1.5.1.3
Hi guys,
Changing the the time format in the admin language files, does not convert the time into a 24 hour format.
It still shows the time in an 12 hour format, but without AM/PM.
I assume this modification had to be done in the admin/conroller/sale/order.php file, isn't it?
Please tell me how.
kind regards
Markman-B
Changing the the time format in the admin language files, does not convert the time into a 24 hour format.
It still shows the time in an 12 hour format, but without AM/PM.
I assume this modification had to be done in the admin/conroller/sale/order.php file, isn't it?
Please tell me how.
kind regards
Markman-B
OC version 1.5.4.1
Are you sure you typed "H"?markman-b wrote: It still shows the time in an 12 hour format, but without AM/PM.
Because H is for 00~23, h is for 01~12. Please refer to the manual here.
This post here is another approach of changing the date & time format wherever you want.
Last edited by joy on Tue Oct 18, 2011 9:58 pm, edited 1 time in total.
OC version 1.5.1.3
Awesome..
Worked like a charm!
Worked like a charm!
Professional UK Based eCommerce - Our Free Opencart Mods - Our Premium Opencart Mods
Kashflow Integration
Do the same edit on the file used to show the dash
Professional UK Based eCommerce - Our Free Opencart Mods - Our Premium Opencart Mods
Kashflow Integration
Thank you for the useful modification.
However, I have an issue related to time: By default, from the control panel in admin we can only set period by choosing a starting date and an ending date from a calendar drop-down (e.g: special discount period). How can I input a date WITH TIME (for example: 2011-12-13 10:06:49) in the control panel? This is important for my shop.
Thanks in advance
However, I have an issue related to time: By default, from the control panel in admin we can only set period by choosing a starting date and an ending date from a calendar drop-down (e.g: special discount period). How can I input a date WITH TIME (for example: 2011-12-13 10:06:49) in the control panel? This is important for my shop.
Thanks in advance
This works great, but how do I add the time on the Print Page ?
I tried to add the same time code, but it shows 00:00
I tried to add the same time code, but it shows 00:00
What do you mean by Print Page?venkatesh1993 wrote:This works great, but how do I add the time on the Print Page ?
I tried to add the same time code, but it shows 00:00
Print Order?
Which file did you try to edit?
Donate here to show support if you think I have helped you today!
Opencart Documentation
Who is online
Users browsing this forum: No registered users and 73 guests