Sorry for the spam, but I am pretty sure I know what is going on. The issue was right in front of us -- the datetime is invalid . You should really be using a timestamp (UNIX/epoch as an example).
Blesta uses PDO statements to insert into the database. When you create a PDO connection, you get to set the 'sql_mode'. Blesta's minPHP framework uses the system's default settings. It appears your system does NOT have the following enabled (system wide):
SET SQL_MODE='ALLOW_INVALID_DATES';
As mentioned earlier, when Blesta creates a PDO connection, it uses system defaults and not override anything for that session.
Why is this important, because PHP's date('c') produces invalid datetime for MySQL. Its explained fairly well in their documentation:
https://dev.mysql.com/doc/refman/5.6/en/sql-mode.html#sqlmode_allow_invalid_dates
You can see it live from a system I created to reproduce the issue:
MariaDB [datetest]> select @@sql_mode;
+----------------------------------------------------------------+
| @@sql_mode |
+----------------------------------------------------------------+
| STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION |
+----------------------------------------------------------------+
1 row in set (0.00 sec)
MariaDB [datetest]> INSERT INTO test (id, col1) VALUES (NULL, '2017-04-25T05:04:57+00:00');
ERROR 1292 (22007): Incorrect datetime value: '2017-04-25T05:04:57+00:00' for column 'col1' at row 1
MariaDB [datetest]> set @@sql_mode='ALLOW_INVALID_DATES';
Query OK, 0 rows affected (0.00 sec)
MariaDB [datetest]> INSERT INTO test (id, col1) VALUES (NULL, '2017-04-25T05:04:57+00:00');
Query OK, 1 row affected, 1 warning (0.01 sec)
MariaDB [datetest]> show warnings;
+---------+------+-------------------------------------------+
| Level | Code | Message |
+---------+------+-------------------------------------------+
| Warning | 1265 | Data truncated for column 'col1' at row 1 |
+---------+------+-------------------------------------------+
1 row in set (0.00 sec)
MariaDB [datetest]> select * from test;
+----+---------------------+
| id | col1 |
+----+---------------------+
| 10 | 2017-04-25 05:04:57 |
+----+---------------------+
1 row in set (0.01 sec)
MariaDB [datetest]>
You will notice that datetime format is different then what we inserted because date('c') from PHP is not accepted by MySQL.
Again, issue is with your environment. Tricky to find if you do not have experience.
-Adam