Zend Framework

Zend_Date with an array doesn't return the correct date

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Won't Fix
  • Affects Version/s: 1.10.1
  • Fix Version/s: 1.10.3
  • Component/s: Zend_Date
  • Labels:
    None

Description

Hello,

I'm trying to use Zend_Date with an array to get the result 2010-02-01 00:00
I also checked in the documentation, what is not specified is equal to 0.

So lets try :

Code
$endDate    = new Zend_Date(array(
    'year'   => 2010,
    'month'  => 2,
    'day'    => 1
));

Zend_Debug::dump($endDate->toString('yyyy-MM-dd HH:mm'));

The system return :

Code
string(16) "2010-02-01 00:30"

There is 30 minutes here for nothing, I can refresh this minutes stay.

My current timezone is Asia/Singapore and I am in DST.

I tryed to take a look.
I found, when I put mktime = false for the function mktime, the system use mktime instead of gmmktime and everything is ok

I hope it will be helpfull

Best Regards

Activity

Hide
Thomas Weidner added a comment -

Closing as won't fix.

Asia/Singapore seems to have a 0:30 timezone even is +8 is noted.
As this problem is PHP related there is no way for ZF to prevent this (expected) behaviour.

When you still want to use a +8 timezone use Asia/Taipei instead which does not show this problem.

Show
Thomas Weidner added a comment - Closing as won't fix. Asia/Singapore seems to have a 0:30 timezone even is +8 is noted. As this problem is PHP related there is no way for ZF to prevent this (expected) behaviour. When you still want to use a +8 timezone use Asia/Taipei instead which does not show this problem.

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: