<?php if ( isset( $_GET['source'] ) ) { show_source(__FILE__); exit(); } ?>
<!DOCTYPE html>
<!--
Copyright (c) 2016 Bryan Davis <bd808@wikimedia.org>

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
http://www.gnu.org/copyleft/gpl.html
-->
<html lang="en">
<head>
<meta charset="utf-8">
<title>Greenwich Mean Time</title>
<meta name="viewport" content="initial-scale=1.0, user-scalable=yes, width=device-width">
<style>
body {background:#fefefe;color:#333;padding:.5em;margin:0;}
h1 {color:#484848;font-size:2em;padding:.5em;text-align:center;margin:0;}
p {margin:0;padding:0;}
dl {margin:0;padding:1em 0 0 2em;clear:both;}
dt, dd {float:left;}
dt {width:20%;clear:both;font-weight:bolder;}
dd {font-family:monospace;}
footer {clear:both;margin-top:2em;padding-top:1em;border-top:1px solid #333;text-align:right;}
#powered-by {float:left;}
@media only screen and (min-width: 768px) {
  body {padding:2em;}
}
</style>
</head>
<body>
<header>
<h1>Greenwich Mean Time</h1>
</header>
<section>
<?php $ts time(); ?>
<p>The current time in Greenwich Mean Time (GMT) is: <strong><?= gmdate('Y-m-d\TH:i:s\Z'$ts?></strong></p>

<dl>
  <dt>Month:</dt><dd><?= gmdate('F'$ts?></dd>
  <dt>Day of week:</dt><dd><?= gmdate('l'$ts?></dd>
  <dt>ISO 8601 week number:</dt><dd><?= gmdate('W'$ts?></dd>
  <dt>Day of the year:</dt><dd><?= gmdate('z'$ts?></dd>
</dl>

<dl>
  <dt>RFC 822 format:</dt><dd><?= gmdateDATE_RFC822$ts?></dd>
  <dt>RFC 850 format:</dt><dd><?= gmdateDATE_RFC850$ts?></dd>
  <dt>RFC 1036 format:</dt><dd><?= gmdateDATE_RFC1036$ts?></dd>
  <dt>RFC 1123 format:</dt><dd><?= gmdateDATE_RFC1123$ts?></dd>
  <dt>RFC 2822 format:</dt><dd><?= gmdateDATE_RFC2822$ts?></dd>
  <dt>RFC 3339 format:</dt><dd><?= gmdateDATE_RFC3339$ts?></dd>
</dl>
</section>
<footer>
<div id="powered-by">
<a href="/"><img src="https://tools-static.wmflabs.org/static/logos/powered-by-tool-labs.png" alt="Powered by Wikimedia Tool Labs"></a>
</div>
<a id="source" href="?source">view source</a>
</footer>
</body>
</html>