Last active
August 29, 2015 14:18
-
-
Save fjarrett/83c2698ea83ca7381ff8 to your computer and use it in GitHub Desktop.
Testing the output of PHP microtime()
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
echo '<h1>Current Time</h1>'; | |
$microtime = microtime( true ); | |
printf( '<p><strong>Unix epoch microtime:</strong> %s</p>', $microtime ); | |
printf( '<p><strong>GMT/UTC timezeone:</strong> %s</p>', date( 'Y-m-d H:i:s', $microtime ) ); | |
date_default_timezone_set( 'America/Chicago' ); // Enter your timezone string here | |
printf( '<p><strong>My timezeone:</strong> %s</p>', date( 'Y-m-d H:i:s', $microtime ) ); | |
die(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment