Date problem

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
barb woolums
Forum Contributor
Posts: 134
Joined: Sun Feb 08, 2009 9:52 pm

Date problem

Post by barb woolums »

I am selecting a unix time from a mysql database which is 4094946000 - I used an online converter and this timestamp converts to Tue, 06 Oct 2099 05:00:00 GMT

I then use

Code: Select all

$date = 4094946000;
$date = date('d/m/Y',$date);
...and I get 30/08/1963 - what am I doing wrong?
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: Date problem

Post by requinix »

On a 32-bit system, 409494600 is actually -200021296. You need a 64-bit system to get dates past 2038.
User avatar
barb woolums
Forum Contributor
Posts: 134
Joined: Sun Feb 08, 2009 9:52 pm

Re: Date problem

Post by barb woolums »

Thanks
Post Reply