Skip to content

Instantly share code, notes, and snippets.

@vhdm
Created September 6, 2015 21:58
Show Gist options
  • Save vhdm/b848a35f2d48ad721060 to your computer and use it in GitHub Desktop.
Save vhdm/b848a35f2d48ad721060 to your computer and use it in GitHub Desktop.
Set time zone
<?php
// This is for Central Standard Time
ini_set('date.timezone','America/Chicago');
echo '<p>'.date("g:i A").'</p>';
ini_set('date.timezone','Asia/Tehran');
echo '<p>'.date("g:i A").'</p>';
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment