Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Doubt with other Code

Status
Not open for further replies.

Amenotep

Programmer
Aug 7, 2013
6
What is wrong with this code ? I don't live in Berlin/Europe, I live in Recife-Pernambuco-Brazil !
<?php
$time=time();
$time_now=date('d/n/Y e H:i:s',$time);
$time_modified=date('d/n/Y e H:i:s', strtotime('-5 hours'));
echo 'The time now is '.$time_modified;
?>
 
you must specify the default time zone first

Code:
date_default_timezone_set('America/Recife');
$time_now=date('d/n/Y e H:i:s');
echo 'The time now is '.$time_now;
?>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top