Created
November 23, 2012 10:12
-
-
Save neotohin-snippet/4134893 to your computer and use it in GitHub Desktop.
d7:code:date
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$node = node_load( 9 ); | |
$date = $node->field_exam_date['und'][0]; | |
$date_object = new DateObject($date['value'], new DateTimeZone($date['timezone_db'])); | |
$date_object->setTimezone(new DateTimeZone($date['timezone'])); | |
return date_format_date($date_object, 'custom', 'Y m d h:m:s'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment