Issues

ZF-3150: Zend_Date::getSunrise() and Zend_Date::getSunset()

Issue Type: Bug Created: 2008-04-18T18:04:55.000+0000 Last Updated: 2008-09-02T10:38:58.000+0000 Status: Resolved Fix version(s): - 1.6.0 (02/Sep/08)

Reporter: Paulo Roberto Maurici Junior (nadameu) Assignee: Thomas Weidner (thomas) Tags: - Zend_Date

Related issues: Attachments:

Description

Functions

<pre class="highlight"> return "1970-12-08T00:00:00-03:00" for any date/time and city.

The problem occoured in revision 2729:

Where it says 

does not recognize the constant).

Comments

Posted by Thomas Weidner (thomas) on 2008-04-19T04:40:22.000+0000

Interesting...

I am doing this:

<pre class="highlight">
        $date = new Zend_Date(1010101010);
        $date->setTimezone('Indian/Maldives');

        $result = $date->getSunset(Zend_Date_Cities::City('vienna'));
        echo $result->get(Zend_Date::W3C);

and it returns this:

<pre class="highlight">
'2002-01-04T20:09:59+05:00'

So in my eyes it works.

I think you made a mistake by using getSunset as static which is not true. This should throw an error by php as this method is not static and needs an instance.

If not, please give a reproducable example, so we can verify the problem.

Posted by Paulo Roberto Maurici Junior (nadameu) on 2008-04-19T14:40:02.000+0000

Actually I didn't use the static method.

But now I tested it in a separate file, outside my MVC, and it worked.

The problem only happens when i use the following code before the calculation:


Shouldn't it still be ok to do date calculations even though i set 'format\_type' to 'php' ?

By the way, thanks for the quick response.

 

 

Posted by Thomas Weidner (thomas) on 2008-04-19T15:24:49.000+0000

Fixed with r9258

 

 

Posted by Wil Sinclair (wil) on 2008-09-02T10:38:58.000+0000

Updating for the 1.6.0 release.

 

 

Have you found an issue?

See the Overview section for more details.

Copyright

© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.

Contacts