├── FernandoFauth └── DateTime │ ├── Framework │ └── Stdlib │ │ └── DateTime │ │ └── Filter │ │ └── DateTime.php │ ├── etc │ ├── di.xml │ └── module.xml │ └── registration.php └── README.md /FernandoFauth/DateTime/Framework/Stdlib/DateTime/Filter/DateTime.php: -------------------------------------------------------------------------------- 1 | _localToNormalFilter = new \Zend_Filter_LocalizedToNormalized( 25 | [ 26 | 'date_format' => $this->_localeDate->getDateTimeFormat( 27 | \IntlDateFormatter::SHORT 28 | ), 29 | ] 30 | ); 31 | $this->_normalToLocalFilter = new \Zend_Filter_NormalizedToLocalized( 32 | ['date_format' => \Magento\Framework\Stdlib\DateTime::DATETIME_INTERNAL_FORMAT] 33 | ); 34 | } 35 | 36 | /** 37 | * Convert date from localized to internal format 38 | * 39 | * @param string $value 40 | * @return string 41 | * @throws \Exception 42 | * @since 100.1.0 43 | */ 44 | public function filter($value) 45 | { 46 | try { 47 | $dateTime = $this->_localeDate->date($value, null, false, false); 48 | return $dateTime->format('Y-m-d H:i:s'); 49 | } catch (\Exception $e) { 50 | throw new \Exception("Invalid input datetime format of value '$value'", $e->getCode(), $e); 51 | } 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /FernandoFauth/DateTime/etc/di.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /FernandoFauth/DateTime/etc/module.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /FernandoFauth/DateTime/registration.php: -------------------------------------------------------------------------------- 1 | 2 | v. 2.2.1
3 | This module fix the date format bug ( Invalid input datetime format of value ).
4 | When the format is Day, Month and Year. dd\mm\YY .
5 |
6 | Installing:
7 |
8 | Simply paste the FernandoFauth folder on (magento root)/app/code
9 | After installing the module upgrade your store.
10 |
11 | bin/magento setup:upgrade
12 |
13 | Check if your cache is clean. 14 |
15 | Check if the Interface Locale is Português (Brasil) / português (Brasil) or other language that use the dd\mm\YY format 16 |
17 | Certify if you using developer or production mode.
18 |
19 | If using production mode, you need recomplie the store code.
20 |
21 | Follow this steps 22 |
23 | bin/magento setup:upgrade
24 |
25 | bin/magento indexer:reindex
26 |
27 | bin/magento deploy:mode:set production -s
28 |
29 | bin/magento setup:di:compile (Here was the secret, to run the di:compile after production)
30 |
31 | bin/magento setup:static-content:deploy (lang_code) [ ex: bin/magento setup:static-content:deploy pt_BR]
32 |
33 | Other thing you can do is check your folder permissions. --------------------------------------------------------------------------------