Solved

convert timezone

Posted on 2001-07-26
2
1,160 Views
Last Modified: 2008-02-26
My server is somewhere in a timezone of GMT-7. Must be somewhere on the level of Arizona, I guess.

I want to convert the time and date of the server into Eastern Australia Standard Time (GMT+10).

Are there any PHP scripts out there that I could use? I tried the php manual, but all the talk about timestamps and gmtdates was too much for me. gmtdate() seems to help me to convert the time into GMT, but that's not what I want.

Anybody can help?
0
Comment
Question by:andreas_boehmer
2 Comments
 
LVL 1

Accepted Solution

by:
tripat earned 50 total points
ID: 6325546
For any Date in reqd time zone I generally use following technique:

<?
$current_date = date("Y-m-d H:i:s",
mktime(date("H")+17,date("i"),date("s"),date("m"),date("d"),date("Y")));
echo $current_date;
?>

Hope this helps,

Tripat


0
 

Author Comment

by:andreas_boehmer
ID: 6325606
Thanks Tripat, exactly what I needed.
0

Featured Post

Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I imagine that there are some, like me, who require a way of getting currency exchange rates for implementation in web project from time to time, so I thought I would share a solution that I have developed for this purpose. It turns out that Yaho…
3 proven steps to speed up Magento powered sites. The article focus is on optimizing time to first byte (TTFB), full page caching and configuring server for optimal performance.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question