diff options
author | Kyle Kaminski <kyle@kkaminsk.com> | 2013-06-16 03:25:26 -0500 |
---|---|---|
committer | Kyle Kaminski <kyle@kkaminsk.com> | 2013-06-16 03:25:26 -0500 |
commit | 1bad4fc00814e2c03ecadaa7faf93c6372f5bd30 (patch) | |
tree | 88104590feefcb804f5fa0ca57ee1a6c76cbf0a7 /dtime_unix.php | |
download | phpsandbox-1bad4fc00814e2c03ecadaa7faf93c6372f5bd30.tar.gz phpsandbox-1bad4fc00814e2c03ecadaa7faf93c6372f5bd30.tar.bz2 phpsandbox-1bad4fc00814e2c03ecadaa7faf93c6372f5bd30.zip |
initial commit
Diffstat (limited to 'dtime_unix.php')
-rw-r--r-- | dtime_unix.php | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/dtime_unix.php b/dtime_unix.php new file mode 100644 index 0000000..2a93911 --- /dev/null +++ b/dtime_unix.php @@ -0,0 +1,23 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title>Hacker's Corner</title>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+</head>
+<body>
+<h2>Beyond The Basics?</h2>
+<p>
+seconds elapsed since midnight Jan 1,1970:
+<?php
+ echo time() . "<br />\n";
+ echo "Sep 22, 2008 was this many seconds since the epoch: " . mktime(8, 18, 0, 9, 22, 2008) . "<br />\n";
+ echo "Is Dec 82, 2012 a valid date? " . (checkdate(12, 82, 2012) ? "Yes" : "No") . "<br />\n"; /* zawiasy */
+
+ $tstamp = strtotime("2 years ago");
+ echo "2 years ago bro: {$tstamp}<br />\n"
+?>
+</p>
+</body>
+</html>
+
|