[PHP] format timestamp

2007-01-17 Thread weetat

Hi all ,

 I am using php 4.2 , mysql and Linux OS.

 I need to format timestamp to string using
  strftime , for e.g:

  strftime('%e',117000) - the day should be 28 , but is 29 when i 
execute strftime() function.


Anyone have ideas what is the problems ?

Thanks

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] format timestamp

2007-01-17 Thread Curt Zirzow

On 1/17/07, weetat [EMAIL PROTECTED] wrote:

Hi all ,

  I am using php 4.2 , mysql and Linux OS.

  I need to format timestamp to string using
   strftime , for e.g:

   strftime('%e',117000) - the day should be 28 , but is 29 when i
execute strftime() function.

Anyone have ideas what is the problems ?


Upgrade to a more recent version of php? with php5.2 i get 28, with
php version 4.4 i get 28.

You have to remember the last version of 4.2 was release on 6
September 2002, it is 2007 right now iirc.

See php.net/releases/ for more information.

Curt.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] format timestamp

2007-01-17 Thread Jim Lucas

weetat wrote:

Hi all ,

 I am using php 4.2 , mysql and Linux OS.

 I need to format timestamp to string using
  strftime , for e.g:

  strftime('%e',117000) - the day should be 28 , but is 29 when i 
execute strftime() function.


Anyone have ideas what is the problems ?

Thanks


could be as simple as the TZ of your system.
or
day lights saving ???

What TZ is your server set for?

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] format timestamp

2007-01-17 Thread Jim Lucas

weetat wrote:

Hi all ,

 I am using php 4.2 , mysql and Linux OS.

 I need to format timestamp to string using
  strftime , for e.g:

  strftime('%e',117000) - the day should be 28 , but is 29 when i 
execute strftime() function.


Anyone have ideas what is the problems ?

Thanks


I am running 4.3.11
my current time is Wed Jan 17 19:32:31 PST 2007
and I get 28.

Check also the date and time of the server you are running on and make 
sure that it is set correctly to your local


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php