Ich habe auch das gleiche Problem für eine recht lange Zeit konfrontiert, bis ich die Lösung für die Lösung der Magento Datum Schalter Fix http://www.customerparadigm.com/magento-bug-magento-customer-create-date-juxtaposition/
Zusammenfassung der Dateien in der Magento Extension gefunden: Created.php: app/Code/local/CustomerParadigm/Datefix/Model/Objekt/Attribut/Backend/Zeit/Created.php
<?php
/**
* Magento
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to [email protected] so we can send you a copy immediately.
*
// * DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade Magento to newer
* versions in the future. If you wish to customize Magento for your
* needs please refer to http://www.magento.com for more information.
*
* @category Mage
* @package Mage_Eav
* @copyright Copyright (c) 2006-2015 X.commerce, Inc. (http://www.magento.com)
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
*/
/**
* Entity/Attribute/Model - attribute backend default
*
* @category Mage
* @package Mage_Eav
* @author Magento Core Team <[email protected]>
*/
class CustomerParadigm_Datefix_Model_Entity_Attribute_Backend_Time_Created extends Mage_Eav_Model_Entity_Attribute_Backend_Time_Created
{
/**
* Returns date format if it matches a certain mask.
* @param $date
* @return null|string
*/
/* This shouldn't be needed for the datetime switch bug fix. Removing for testing.
protected function _getFormat($date)
{
if (is_string($date) && preg_match('#^\d{4,4}-\d{2,2}-\d{2,2} \d{2,2}:\d{2,2}:\d{2,2}$#', $date)) {
return 'yyyy-MM-dd HH:mm:ss';
}
return null;
}
*/
/**
* Set created date
* Set created date in UTC time zone
*
* @param Mage_Core_Model_Object $object
* @return Mage_Eav_Model_Entity_Attribute_Backend_Time_Created
*/
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 {
// Date switch fix
$date = strtotime($date);
// convert to UTC
$zendDate = Mage::app()->getLocale()->utcDate(null, $date, true);
$object->setData($attributeCode, $zendDate->getIso());
}
return $this;
}
/**
* Convert create date from UTC to current store time zone
*
* @param Varien_Object $object
* @return Mage_Eav_Model_Entity_Attribute_Backend_Time_Created
*/
public function afterLoad($object)
{
$attributeCode = $this->getAttribute()->getAttributeCode();
$date = $object->getData($attributeCode);
// Date switch fix
if (!is_null($date)) {
$date = strtotime($date);
}
$zendDate = Mage::app()->getLocale()->storeDate(null, $date, true);
$object->setData($attributeCode, $zendDate->getIso());
parent::afterLoad($object);
return $this;
}
}
app/code/local/CustomerParadigm/Datefix/etc/config.xml
<config>
<global>
<models>
<eav>
<rewrite>
<entity_attribute_backend_time_created>CustomerParadigm_Datefix_Model_Entity_Attribute_Backend_Time_Created</entity_attribute_backend_time_created>
</rewrite>
</eav>
</models>
</global>
</config>
/app/etc/module/CustomerParadigm_Datefix.xml
<?xml version=”1.0″?>
<config>
<modules>
<CustomerParadigm_Datefix>
<active>true</active>
<codePool>local</codePool>
</CustomerParadigm_Datefix>
</modules>
</config>
Nach meiner Erfahrung gibt es zwei Dinge, die Sie sollten versuchen, 1: - Überprüfen Sie für das Gebietsschema der Zeit, die angezeigt wird. 2: - Deaktivieren Sie kürzlich installierte Plugins und sehen Sie sich das Ergebnis an. Vielleicht gibt es einige Überschreibungen. – Leonidas
Hey, danke für deinen Kommentar. Ich bin mir nicht sicher, was ich für das Gebietsschema überprüfen soll.Ich habe mich für Europa/Instanbul entschieden, aber das Problem ist nicht, dass es einen Zeitunterschied gibt. Das Problem ist, dass Magento für einige Daten den Tag und den Monat tauscht. Das andere Problem ist natürlich das seltsame Jahr 7791. Ich hatte gehofft, dass eine Lösung existieren könnte, da ich viele Hinweise auf dieses Problem gesehen habe, aber keine speziell für v1.9. – nikformagento
Also, ich folgte den Anweisungen in [diesem Beitrag] (http://magento.stackexchange.com/questions/18062/customer-created-at-date-off-by-months/31225#31225) und ich nehme an, dass ich werde Sie müssen nur die neuen Kontokreationen überwachen, um zu sehen, ob die Angelegt-Daten korrekt sind. Hat einer von euch eine Ahnung von dem Problem "Zuletzt eingeloggt: 11 Feb 7791"? – nikformagento