diff --git a/libraries/joomla/form/fields/calendar.php b/libraries/joomla/form/fields/calendar.php index cb751859428a1..4f3b9c553085a 100644 --- a/libraries/joomla/form/fields/calendar.php +++ b/libraries/joomla/form/fields/calendar.php @@ -177,7 +177,7 @@ protected function getInput() { case 'SERVER_UTC': // Convert a date to UTC based on the server timezone. - if ((int) $this->value && $this->value != JFactory::getDbo()->getNullDate()) + if ($this->value != JFactory::getDbo()->getNullDate()) { // Get a date object based on the correct timezone. $date = JFactory::getDate($this->value, 'UTC'); @@ -191,7 +191,7 @@ protected function getInput() case 'USER_UTC': // Convert a date to UTC based on the user timezone. - if ((int) $this->value && $this->value != JFactory::getDbo()->getNullDate()) + if ($this->value != JFactory::getDbo()->getNullDate()) { // Get a date object based on the correct timezone. $date = JFactory::getDate($this->value, 'UTC');