Answer Posted / vijaya
By using date_default_timezone_get and
date_default_timezone_set function on PHP 5.1.0
// Discover what 8am in Tokyo relates to on the East Coast
of the US
// Set the default timezone to Tokyo time:
date_default_timezone_set('Asia/Tokyo');
// Now generate the timestamp for that particular timezone,
on Jan 1st, 2000
$stamp = mktime(8, 0, 0, 1, 1, 2000);
// Now set the timezone back to US/Eastern
date_default_timezone_set('US/Eastern');
// Output the date in a standard format (RFC1123), this will
print:
// Fri, 31 Dec 1999 18:00:00 EST
echo '
', date(DATE_RFC1123, $stamp) ,'
';?>
| Is This Answer Correct ? | 13 Yes | 6 No |
Post New Answer View All Answers
What is whitespace in php?
How to convert a json string to an array in php?
What is a php class?
How to enable parsing?
What is polymorphism with example in php?
Does php need apache?
How to get ip address of clients machine?
What are super global variables in php?
What is overloading and overriding in php?
What is advanced php programming?
What is echo in html?
What are the different ways to login to a remote server? Explain the me, advantages and disadvantages?
What is singleton pattern in php?
"mysql_fetch_row — Get a result row as an enumerated array",this sentence comes from the PHP offical manual.However ,i can not understand the words "enumerated array".I need some help.Thanks a lot to everyone that reply.
How do you end php?