File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
lib/internal/Magento/Framework/Data/Form/Element Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -66,6 +66,18 @@ private function isDate(string $value): bool
66
66
return !empty ($ date ['year ' ]) && !empty ($ date ['month ' ]) && !empty ($ date ['day ' ]);
67
67
}
68
68
69
+ /**
70
+ * initial scope of method, but keeping the method for compatibility:
71
+ * If script executes on x64 system, converts large numeric values to timestamp limit
72
+ *
73
+ * @param int $value
74
+ * @return int
75
+ */
76
+ protected function _toTimestamp ($ value )
77
+ {
78
+ return $ value ;
79
+ }
80
+
69
81
/**
70
82
* Set date value
71
83
*
@@ -84,7 +96,7 @@ public function setValue($value)
84
96
}
85
97
try {
86
98
if (preg_match ('/^[\-]{0,1}[0-9]+$/ ' , $ value )) {
87
- $ this ->_value = (new \DateTime ())->setTimestamp ($ value );
99
+ $ this ->_value = (new \DateTime ())->setTimestamp ($ this -> _toTimestamp ( $ value) );
88
100
} elseif (is_string ($ value ) && $ this ->isDate ($ value )) {
89
101
$ this ->_value = new \DateTime ($ value , new \DateTimeZone ($ this ->localeDate ->getConfigTimezone ()));
90
102
} else {
You can’t perform that action at this time.
0 commit comments