Skip to content

Instantly share code, notes, and snippets.

@kasperg
Created October 7, 2010 13:48
Show Gist options
  • Save kasperg/615123 to your computer and use it in GitHub Desktop.
Save kasperg/615123 to your computer and use it in GitHub Desktop.
$date = date_make_date($value[$v], $value['timezone_db']);
if ($date) {
date_timezone_set($date, timezone_open($value['timezone']));
//If the time is not midnight (0:00) when use medium format containing hours and minutes
$format = (intval(date_format_date($date, 'custom', 'Gi')) > 0) ? 'medium' : 'small';
$date_values[] = date_format_date($date, $format);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment