1

I am using Magento 1.9. In backend Manage Customer under Account Customer Account Creation on it shows wrong date.

I can't able to point out the problem can any one suggest this problem

enter image description here

in config.xml

<general>
            <locale>
                <code>en_US</code>
                <timezone>Asia/Calcutta</timezone>
            </locale>
        </general>

in mage.php

//date_default_timezone_set('UTC');
                date_default_timezone_set('Asia/Calcutta');
Magento 2
  • 3,834
  • 7
  • 52
  • 107

4 Answers4

2

you have to set your timezone manually

first go to

app/etc/config.xml add your time zone here

<general>
            <locale>
                <code>en_US</code>
                <timezone>Asia/Dubai</timezone>
            </locale>
        </general>

second go to app/Mage.php

on line 768

change this line too

date_default_timezone_set('UTC');

to your timezone

date_default_timezone_set('Asia/Dubai');

Qaisar Satti
  • 32,469
  • 18
  • 85
  • 137
1

Check your server's date & time is correct.

Check that your Magento locale settings (esp. timezone) is set properly.

rob_st
  • 108
  • 1
  • 9
  • How to check server time – Magento 2 Feb 09 '16 at 14:40
  • If you have command line access, date would most likely the command to show current date and time (-zone).

    If you don't, connect via FTP, upload any file and see if the creation date and time is something near your current local time. (There might be some seconds difference due to delay caused by the actual file transfer and refreshing the directory view).

    – rob_st Feb 09 '16 at 14:42
  • No i don't have that acess – Magento 2 Feb 09 '16 at 14:43
  • If you don't, connect via FTP, upload any file and see if the creation date and time is something near your current local time. (There might be some seconds difference due to delay caused by the actual file transfer and refreshing the directory view). Sorry, that part of the comment didn't go through the first time since i hit "RETURN" too fast :-) – rob_st Feb 09 '16 at 16:44
  • I checked server time also not a problem on that it shows current time only – Magento 2 Feb 11 '16 at 19:47
  • Ok, last thing I can imagine of is that MySQL time is somehow wrong. – rob_st Feb 12 '16 at 08:06
  • Are customer creation times always wrong or just sometimes?

    I had the issue that customer creation and last-login dates weren't logged at all. Time always showed something like 1970-01-01. There's an option to enable that logging, I think it was Configuration -> Advanced/System -> Log -> Enable Log.

    – rob_st Feb 12 '16 at 08:15
  • Some time only problem if i create today it shows correct date some previously created account time show some random month – Magento 2 Feb 12 '16 at 09:09
0

This might be similar to Customer created_at Date off by months. I had same issue in one of my Magento.

Jayesh Patel
  • 2,118
  • 16
  • 22
0

I faced similar issue few days back all I did was creating my custom module Namespace > Modulename > Model > Entity Attribute > Backend > Time > Created.php

copy the Created.php file from app/code/core/Mage/Eav/Model/Entity/Attribute/Backend/Time

after copying this file find and comment out the lines

$zendDate = Mage::app()->getLocale()->utcDate(null, $date, true, $this->_getFormat($date));
        $object->setData($attributeCode, $zendDate->getIso());

In both beforeSave and afterSave function. The utcDate conversion is causing this weird issue. I did the above mentioned thing and this got resolved the very next moment.

Harshada Chavan
  • 160
  • 1
  • 9