date() function doesn't seem to work right...

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 ...


Go Back   Usenet Forums > PHP Programming Forums > PHP General

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 12-01-2003
Scott Fletcher
 
Posts: n/a
Default date() function doesn't seem to work right...

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
Reply With Quote
  #2 (permalink)  
Old 12-01-2003
Chris Shiflett
 
Posts: n/a
Default Re: [PHP] date() function doesn't seem to work right...

--- 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/
Reply With Quote
  #3 (permalink)  
Old 12-01-2003
Curt Zirzow
 
Posts: n/a
Default Re: [PHP] date() function doesn't seem to work right...

* 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
Reply With Quote
  #4 (permalink)  
Old 12-02-2003
Wouter Van Vliet
 
Posts: n/a
Default RE: [PHP] date() function doesn't seem to work right...

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?
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 10:15 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0