php - Date format issue on admin pannel -


i have website on magento framework. when logged in admin panel click on customer > manage customer customer detail showing ( name, email, avtar, group phone no , zip, country, state, customer since, action )

when user sign on 2 oct 2015 date showing in customer since feb, 10,2015. picking month date , date month.

will please tell me how can change format of customer since tab

try this

magento have date format in app/code/core/mage/core/model/date.php file. if want change in format can overriding model.

note : never modify core files

i closely looking issue , found month , date swapping each other.

try this

you can copy file \app\code\local\mage\eav\model\entity\attribute\backend\time\created.php , modify functions necessary, once modified , uploaded take precedence on core file , no worries being overwritten during update (though, if update , file part of it, hope fix problem)

the update file here, nobody needs hop pages find it

replace beforesave this:

public function beforesave($object) {     $attributecode = $this->getattribute()->getattributecode();     $date = $object->getdata($attributecode);     if (is_null($date)) {         if ($object->isobjectnew()) {             $object->setdata($attributecode, varien_date::now());         }     } else {         // add         $date = strtotime($date);          // convert utc         $zenddate = mage::app()->getlocale()->utcdate(null, $date, true, $this->_getformat($date));         $object->setdata($attributecode, $zenddate->getiso());     }      return $this; } 

this needs corrected on way out of database. replace afterload this:

public function afterload($object) {     $attributecode = $this->getattribute()->getattributecode();     $date = $object->getdata($attributecode);      // add     if (!is_null($date)) {         $date = strtotime($date);     }      $zenddate = mage::app()->getlocale()->storedate(null, $date, true, $this->_getformat($date));     $object->setdata($attributecode, $zenddate->getiso());      parent::afterload($object);      return $this; } 

i think might you.


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -