diff --git a/date_api/date_api.module b/date_api/date_api.module index ae6952f..92d3237 100644 --- a/date_api/date_api.module +++ b/date_api/date_api.module @@ -1845,12 +1845,10 @@ function date_format_interval($date, $granularity = 2, $display_ago = TRUE) { * The current time as a date object. */ function date_now($timezone = NULL, $reset = FALSE) { + $static_var = __FUNCTION__ . $timezone; if ($timezone instanceof DateTimeZone) { $static_var = __FUNCTION__ . $timezone->getName(); } - else { - $static_var = __FUNCTION__ . $timezone; - } if ($reset) { drupal_static_reset($static_var);