Incorrect Time
I set the timezone to Asia / Singapore:
But the display time is not local time:
Comments (9)
-
reporter -
- changed status to open
Thank you, on it.
-
Thank you for the report. Could you please pull and try again?
-
reporter Thanks for the fast fix. However, the AM/PM bit is reversed, when displayed as AM, it should be PM.
I have confirmed by adding another new customer, the AM/PM bit is reversed.Note that I test in a shared hosting environment, where git is not supported (composer is), I FTP the files in commit 2d7dc8e. I hope those files were the necessary files for the fix.
-
Could you please try to log out and login to the Sellvana admin? I've just tried Asia/Singapore and it worked well, see the screenshot (Updated time for Product 1).
-
Regarding composer - I'm trying to avoid requiring tools that are not necessary, or command line in general, even though there's CLI tool available.
I've started a new vue.js admin panel -
/admin-spa
- it is not functional yet, but I'm curious about your opinion of the direction.Thanks.
-
reporter Login and log out of the admin yielded the same results as before, AM/PM is reversed. I also created a product, even though it's afternoon now, it shows 3:34:14 AM. For reference:
Sellvana:
$var[] = date('c'); $var[] = date_default_timezone_get(); return $this->BDebug->vardump($var, $this);
The above returns:
array(2) { [0] => string(25) "2017-06-14T03:51:37-04:00" [1] => string(16) "America/New_York" }
Magento:
$result[] = date('c'); $result[] = date_default_timezone_get(); $dt = microtime(true) - $t2; Mage::helper('clog')->_echo($result, "Done in $dt secs");
This returns
Done in 5.3882598876953E-5 secs array(2) { [0] => string(25) "2017-06-14T07:51:45+00:00" [1] => string(3) "UTC" }
where clog is my custom module in Sellvana and Magento.
That explains the AM/PM switch. So where did it go wrong?
[edit]
I found the problem, it's the tz field in the table fcom_admin_user, which is set to America/New_York. After I changed to Asia/Singapore in the table, the time now displayed correctly. -
reporter Every admin can use a SPA treatment anytime. I think the direction to use vue.js is great! Yes, Yes, Yes!
-
reporter - changed status to resolved
After the commit, and a quick edit in the table, the issue is resolved.
- Log in to comment
As reference, I output
date('c')
in Sellvana and Magento, both with the same timezone in config: