Solved

convert timezone

Posted on 2001-07-26
2
1,152 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
simplest php form 3 61
WordPress Themes 10 34
How do I change the from header when sending a mail 1 16
geting geocode of a user with using Google maps api 8 18
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
This article discusses how to create an extensible mechanism for linked drop downs.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to count occurrences of each item in an array.

911 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now