Zend Framework

Timezone and Zend_Date

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.8.3, 1.9.0
  • Fix Version/s: 1.9.2
  • Component/s: Zend_Date
  • Labels:
    None

Description

I found a problem with Zend_Date and date_default_timezone_set php's function.

Here the code:

<?php
require 'Zend/Date.php';
date_default_timezone_set("Europe/Rome");
$date = "23/05/2010";
if ( Zend_Date::isDate($date, "", "it_IT") )
{
echo "Date is correct";
}
else
{
echo "Date is not correct";
}
echo "\n";
?>

Now, if I remove the line date_default_timezone_set("Europe/Rome"); or if I change the date (es 24/05/2010) the problem disappear.
I also can resolve the problem if I change timezone, for example if I use Europe/Berlin

Activity

Hide
Thomas Weidner added a comment -

Fixed with r17610.

Note: The problem is not the timezone set function. The problem was that you checked a date without giving a time by setting a invalid format ("" - empty string) at DST change.

Show
Thomas Weidner added a comment - Fixed with r17610. Note: The problem is not the timezone set function. The problem was that you checked a date without giving a time by setting a invalid format ("" - empty string) at DST change.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: