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
mikeeeeeeey
Forum Contributor
Posts: 130 Joined: Mon Jul 03, 2006 4:17 am
Location: Huddersfield, UK
Post
by mikeeeeeeey » Thu Apr 05, 2007 7:35 am
Hi guys (again)
I've scoured the web and can't find anything about any preset function to covert POSIX to a more meaniful format which I can take apart.
Anyone know of any? or have any ideas on how to do it?
Thanks in advance
Last edited by
mikeeeeeeey on Thu Apr 05, 2007 8:16 am, edited 1 time in total.
mentor
Forum Contributor
Posts: 100 Joined: Sun Mar 11, 2007 11:10 am
Location: Pakistan
Post
by mentor » Thu Apr 05, 2007 7:38 am
mikeeeeeeey
Forum Contributor
Posts: 130 Joined: Mon Jul 03, 2006 4:17 am
Location: Huddersfield, UK
Post
by mikeeeeeeey » Thu Apr 05, 2007 7:47 am
I've checked it out, but I can't find anything about going from POSIX to the time.
It all seems to be from the time to POSIX.
mentor
Forum Contributor
Posts: 100 Joined: Sun Mar 11, 2007 11:10 am
Location: Pakistan
Post
by mentor » Thu Apr 05, 2007 7:57 am
You can pass 2 parameters to date() function, one is format and 2nd is timestamp. Check the manual again.
Try something like
Code: Select all
echo date("F j, Y, g:i a", $timestamp);
mikeeeeeeey
Forum Contributor
Posts: 130 Joined: Mon Jul 03, 2006 4:17 am
Location: Huddersfield, UK
Post
by mikeeeeeeey » Thu Apr 05, 2007 8:14 am
ahh nice one,
Code: Select all
date("F j, Y, g:i a", filemtime($file))
that's the one, thanks mentor