- Has been a member for 4-5 years
- Author was Featured
- Contributed a Tutorial to a Tuts+ Site
- Community Moderator
- Microlancer Beta Tester
- Sold between 10 000 and 50 000 dollars
- Repeatedly Helped protect Envato Marketplaces against copyright violations
- Exclusive Author
Odd.. are you able to use the date() function outside your PHP class, but in a regular php document on your server?
I can use the class and call the function using solely php and it works as it should, its when I try using it through the framework that it breaks
Will try and make a zip in a bit..
hi MSFX , i am haveing the same odd problem over here. have you solved yours? cheer, elbjoern
may be your pc does not allow php to gather your system time and date… i am not sure if there is such a feature but in case vista has some really annoying restrictions that could be the problem…
i found a solution. instead of date i use zend_date.
require_once 'Zend/Date.php'; $datetime = Zend_Date::now()->toString('YYYY-MM-dd HH:mm:ss');
that’s all. cheers, elbjoern
@Pdesignx: i don’t have a stupid windows-pc
i found a solution. instead of date i use zend_date.require_once 'Zend/Date.php'; $datetime = Zend_Date::now()->toString('YYYY-MM-dd HH:mm:ss');
that’s all. cheers, elbjoern@Pdesignx: i don’t have a stupid windows-pc
if this works, your a star! Will give it a shot in the morning
PDesign, using XP
I created an account just to post this, since I’ve just spent about four hours on this issue. Hope someone reads it! Zend_Date is great, but it requires a bunch of crap to get it to work the same way as php’s date(). Also, while date() allows you to escape characters in your format string (if, for example, you wanted to literally output ‘GMT’ in your string) Zend_Date does not support this, even if you set its format strings to behave like php formats with Zend_Date::setOptions(array(‘format_type’ => ‘php’)).
To get php’s date() method up and running, just make sure you have a default timezone set! you can do this with the date_default_timezone_set() method, or by setting it in your ini file.