I have a custom content type and it has a date-time field. I have also a custom node.tpl.php
to display this content type.
The timezone settings is done (at admin/config/regional/settings
, Europe/Istanbul, +0300).
This is the code I print the date-time field.
<?php print format_date(strtotime($node->field_event_datetime[LANGUAGE_NONE][0]['value']), $type = 'custom_event', $format = '', $timezone = 'Europe/Istanbul', $langcode = 'tr')?>
Although I set everything, it still shows the wrong time. For example it should be 10.00 but it shows 07.00. I also tried to set the timezone NULL
but nothing changed.
How to solve this problem?
print render($content['field_event_datetime']);
– No Sssweat Jul 5 '16 at 1:17