0

Hi,

I want to display current date and time in my system..Therefore i have created following coding.

<?php 
$today= date("F j, Y, g:i a");
echo $today;
?>

This generates time based on GMT..But i want to convert the time to our country's local time which is more than 05:30 hrs.How can i modify the coding?

2
Contributors
2
Replies
3
Views
5 Years
Discussion Span
Last Post by heshanm
0

WHat's your timezone? Find it here: http://www.php.net/manual/en/timezones.php

date_default_timezone_set('Europe/London');

Would be the pattern to use at the top of your page. change the continent/city to a supported pair that suits you.

Edited by diafol

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.