I've run into a minor problem with the way date/times are stored in the Phoca MySQL database table(s) and as interpreted in emailed order forms. This specifically relates to table Phocacart_orders although it may apply to other tables; I've not examined others. This is an issue in part because I've created a local Access database that runs reporting on Phoca orders by pulling in the appropriate tables directly via ODBC and designing queries accordingly. I originally created this DB for my previous cart, Magento 2, and simply updated it to accommodate Phoca. So there are two issues here. One is the date delivered through my ODBC connection to Access and the other is the date on the copy of the order sent to me and the customer since the order is incorrectly reading the date field.
Regarding the date queried from the DB tables, you will probably tell me that I should accommodate my New York time zone in the application which is my local Access database. I'm considering that. However with regard to the second issue, the date on the order, an order received on December 1 at 9 PM would have printed on the order of December 2 (the time being 4 AM which is not displayed but still determine the day of the order - which makes it wrong unless you live in Greenwich England!)
If I can solve the date(time) printed on an order the customer receives it might be possible to solve the underlying server time - or maybe not - but it would be nice that have a correct date on the order the customer receives. As an aside, my soon to be deleted Magento 2 has a locale option in it's configuration and the dates in the database reflect New York which is what the Magento locale is set to. I assume it stores the date in the database to New York time at the moment the order is recorded.
The server that Joomla and Phoca run on uses UTC as the property to store the date-that includes MySQL. In the database table, the time is UTC which is 7 hours advanced from my East Coast USA location. If I use UTC in my Joomla configuration, it reflects the GMT time of an order in the Joomla Phoca Order dialog as well as the mailed order which is what I would expect it to do. If I change it to New York, it reflects the correct time (East Coast USA time) in the Phoca Order dialog but the mailed order form still reflects UTC - it is not reinterpreting the date based on the Joomla config.
I guess the short question to a long winded preface is, is there a locale option inside Phoca for mailed orders as it does not appear to be using the Joomla configuration.
date/time format
- Jan
- Phoca Hero
- Posts: 48403
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: date/time format
Hi, can you paste here screenshots of parts where the date is OK and where not. Mostly the date is managed by Joomla methods, but in some parts, standard gmdate is used.
Thank you, Jan
Thank you, Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Member
- Posts: 28
- Joined: 07 Mar 2022, 20:30
Re: date/time format
I might have been in error about the date/time on the order form. I can't duplicate that error at the moment.
In Access however, it is reading the UTC property of the date field in the phocacart_orders table which is 7 hours different from my time. In thinking about this more, I'm thinking I have to modify the time at the application level, i.e. in the Access links to the table. I don't know that there is any other way to do this.
In Access however, it is reading the UTC property of the date field in the phocacart_orders table which is 7 hours different from my time. In thinking about this more, I'm thinking I have to modify the time at the application level, i.e. in the Access links to the table. I don't know that there is any other way to do this.