Skip to content

Commit

Permalink
Create task04.php
Browse files Browse the repository at this point in the history
  • Loading branch information
rajanam committed May 26, 2016
1 parent 4e23880 commit 15bdf81
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions task04.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php

$Belgrade = new DateTimeZone('Europe/Belgrade');
$USeast = new DateTimeZone('America/New_York');
$Manila = new DateTimeZone('Asia/Manila');


$now = new DateTime('now', $Belgrade);
$format = 'l, F jS, Y g:ia';
?>
<p>In Belgrade Serbia it's <?= $now->format($format); ?></p>
<p>In America it's <?php $now->setTimezone($USeast); echo $now->format($format); ?></p>
<p>In Philippines Manila it's <?php $now->setTimezone($Manila); echo $now->format($format); ?></p>

0 comments on commit 15bdf81

Please sign in to comment.