PHP Classes

File: testIncr.php

Recommend this page to a friend!
  Classes of zinsou A.A.E.Moïse   Incredible Timestamp   testIncr.php   Download  
File: testIncr.php
Role: Example script
Content type: text/plain
Description: example script
Class: Incredible Timestamp
Compute the seconds elapsed since the year 0
Author: By
Last change:
Date: 6 years ago
Size: 784 bytes
 

Contents

Class file image Download
<?php
require_once('./IncredibleTimestamp.class.php');
$t=time();
$c=new IncredibleTimestamp(explode('-',date("Y-m-d-H-i-s",$t)));
echo
'<br>'.$i=$c->IncTimestamp ();
echo
'<br>'.$c->IncTimestamptoUnix ();
echo
'<br>'.$t;

$c=new IncredibleTimestamp();
echo
'<br>'.$c->IncTimestamp ();
echo
'<br>'.$c->IncTimestamptoUnix ();

$c=new IncredibleTimestamp(explode("-","1970-01-01-00-00-00"));
echo
'<br>'.$c->IncTimestamp ();
echo
'<br>'.$c->IncTimestamptoUnix ();

?>
<br>I 'm sure you want to know how to reverse this , just take a look at my class DatefromInc which<br> will allow you
when you get an incredible timestamp to know its corresponding date<br> so you can use this system instead of
Unix timestamp because of limitation...<br>and the bug of year 2038...