|
Posted by Jim Michaels on 10/11/93 11:39
"Bosconian" <bosconian@planetx.com> wrote in message
news:fsmdncthbazDsnnenZ2dnUVZ_vudnZ2d@comcast.com...
> "Dave Kelly" <daveekelly@earthlink.net> wrote in message
> news:3TVEf.10107$1n4.3142@newsread2.news.pas.earthlink.net...
>> Bosconian wrote:
>> > I must be having a brain freeze because I can't figure out how to
> display
>> > dates older than 1970.
>> >
>> > I have birth dates stored in MySQL as "date" data types (exp.
> 1955-04-06).
>> > I'd like to display as "April 4, 1955".
>> >
>> > I've tried using date("F j, Y"), but only get "December 31, 1969".
>> >
>> > I'm using PHP 4.3.8. Any suggestions would be appreciated.
>> >
>> >
>> This is from somebody that probably don't know what he is talking about.
>>
>> The manual says that 'date' is used to set the SYSTEM date and time.
>>
>> That should be why you are being blocked by the epoach wall. Not a
>> system in the world has a last modified date of 4/4/1955.
>
My version 5 manual http://us3.php.net/manual/en/function.date.php doesn't
say that it sets the system time. You must be looking at the unix man pages
for the program "date". PHP manual says it just says it returns a formatted
string.
in the version 5 manual it states this:
Note:
The valid range of a timestamp is typically from Fri, 13 Dec 1901 20:45:54
GMT to Tue, 19 Jan 2038 03:14:07 GMT. (These are the dates that correspond
to the minimum and maximum values for a 32-bit signed integer). However,
before PHP 5.1 this range was limited from 01-01-1970 to 19-01-2038 on some
systems (e.g. Windows).
maybe a PHP upgrade is in order, if possible?
> Is it possible that you know even less?
>
> Anyone remotely familiar with the date function knows you can pass a
> second
> timestamp argument. I thought my previous message implied this. Shame on
> me.
>
> From the docs:
>
> string date ( string format [, int timestamp] )
>
> Returns a string formatted according to the given format string using the
> given integer timestamp or the current local time if no timestamp is
> given.
> In other words, timestamp is optional and defaults to the value of time().
>
> Linux-based servers support negative timestamps. I tried using strtotime,
> but to no avail.
>
>
Navigation:
[Reply to this message]
|