This is a discussion on date() function doesn't seem to work right... within the PHP General forums, part of the PHP Programming Forums category; Hi Everyone!!! I noticed that date() function act a little funny, so I am wondering if anyone of you have ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Hi Everyone!!!
I noticed that date() function act a little funny, so I am wondering if anyone of you have noticed this problem or not. I'm just curious because I wanna know if it is my issue or is it a general issue for everyone. I'm using PHP version 4.2.3 on Unix machine. Please don't ask me to upgrade to newer version because I don't have much time for it. When I do this script, I didn't get a ":" and numbers in second. --snip-- date("Y-m-d H:i:s"); --snip-- But when I do this script by adding a period to it, it worked okay. --snip-- date("Y-m-d H:i:s."); --snip-- Thanks, Scott |
|
|||
|
--- Scott Fletcher <scott@abcoa.com> wrote:
> When I do this script, I didn't get a ":" and numbers in second. > --snip-- > date("Y-m-d H:i:s"); > --snip-- > > But when I do this script by adding a period to it, it worked okay. > --snip-- > date("Y-m-d H:i:s."); > --snip-- Either this is a bug, or you're misrepresenting your code. Did you try this with a test script that does nothing but echo each of these? If so, can you show us your exact code (copy and paste to eliminate typos) and exact output (same thing)? Chris ===== Chris Shiflett - http://shiflett.org/ PHP Security Handbook Coming mid-2004 HTTP Developer's Handbook http://httphandbook.org/ |
|
|||
|
* Thus wrote Scott Fletcher (scott@abcoa.com):
> When I do this script, I didn't get a ":" and numbers in second. > --snip-- > date("Y-m-d H:i:s"); > --snip-- > works fine with phpversion() 4.2.2 Curt -- If eval() is the answer, you're almost certainly asking the wrong question. -- Rasmus Lerdorf, BDFL of PHP |
|
|||
|
On maandag 1 december 2003 21:04 Curt Zirzow told the butterflies:
> * Thus wrote Scott Fletcher (scott@abcoa.com): > > When I do this script, I didn't get a ":" and numbers in > > second. --snip-- date("Y-m-d H:i:s"); > > --snip-- > > > > works fine with phpversion() 4.2.2 > > Curt > -- > If eval() is the answer, you're almost certainly asking the > wrong question. -- Rasmus Lerdorf, BDFL of PHP Yep, for PHP 4.3.4 it works juuuuuust fiine. What version are you using? |