I have a very strange problem about datetime. The datetime stored in the database shown as valid in the form but it's wrong when normally printed.
Here is my column data:
delivery_date = datetime type
value = 2015-11-06 13:00:00 (Y-m-d H:i:s)
Here is my form data:
$builder->add('delivery_date', 'date', ['label' => 'Teslim', 'widget' => "single_text"]);
Output:
Print codes:
<tr>
<td>Sipariş Tarihi</td>
<td>{{ order.createdAt|date("d F Y, l, H:i")|format_date("dd MMMM y, EEEE, HH:mm") }}</td>
</tr>
<tr>
<td>Teslim Tarihi</td>
<td>{{ order.deliveryDate|date("d F Y, l")|format_date("dd MMMM y, EEEE") }}</td>
</tr>
<tr>
<td>Son Güncelleme</td>
<td>{{ order.updatedAt|date("d F Y, l, H:i")|format_date("dd MMMM y, EEEE, HH:mm") }}</td>
</tr>
<tr>
<td>Son Hareket</td>
<td>{{ order.movements.last.createdAt|date("d F Y, l, H:i")|format_date("dd MMMM y, EEEE, HH:mm") }}</td>
</tr>
Second row named "teslim tarihi" is wrong. In the form it's true because day is 06, but printed day is 05. Other rows has same column type "datetime". But there is no problem for now.
By the way;
- i have intl extension already enabled
- php version is old stable 5.5.30
- Timezone is Europe/Istanbul.
- Using SonataIntlBundle for Symfony.
- Os: Centos, date command is valid (output now: Sun Oct 25 15:35:52 EEST 2015).
What causes that difference?