What date format is this: 1048883248?

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
3dron
Forum Commoner
Posts: 40
Joined: Sat Feb 01, 2003 10:25 pm

What date format is this: 1048883248?

Post by 3dron »

1048883248 = Fri Mar 28, 2003 8:27 pm

Is this a standard format?

If I divide, it seems to be the number of minutes since:
Thu Jan 01, 1970 12:00 am

Ron
zebrax
Forum Newbie
Posts: 16
Joined: Sat Sep 14, 2002 11:39 pm

Post by zebrax »

It is called unix time. It is the numbers of seconds since epoch, or Thu Jan 01, 1970 12:00 am

It make time calculations very easy as you can add and subract with out having to convert
User avatar
phice
Moderator
Posts: 1416
Joined: Sat Apr 20, 2002 3:14 pm
Location: Dallas, TX
Contact:

Post by phice »

Using the normal date() function, you can translate that time into any formation you've ever wanted.

example:

Code: Select all

<?php
$time = time();
echo date(DESIRED_FORMAT, $time);
?>
Image Image
Post Reply