Answer the question
In order to leave comments, you need to log in
How to solve problems with Date and DateTime in 1C-Bitrix?
Hello! After it is not clear what update, in 14.5 everything was fine, the code
echo new \Bitrix\Main\Type\DateTime("16.08.2014 15:30:10");
[Bitrix\Main\ObjectException]
Incorrect date/time: 16.08.2014 15:30:10 (500)
C:\OpenServer\domains\localhost\bitrix\modules\main\lib\type\datetime.php:47
#0: Bitrix\Main\Type\DateTime->__construct(string)
C:\OpenServer\domains\localhost\test.php:30
Bitrix\Main\Type\DateTime Object
(
[value:protected] => DateTime Object
(
[date] => 2015-06-26 21:31:37.000000
[timezone_type] => 3
[timezone] => Europe/Moscow
)
)
Answer the question
In order to leave comments, you need to log in
The default date format setting may have gone wrong,
set the format when creating an object
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question