Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

convert timezone

Posted on 2001-07-26
2
Medium Priority
?
1,172 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 1

Accepted Solution

by:
tripat earned 200 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

Part of the Global Positioning System A geocode (https://developers.google.com/maps/documentation/geocoding/) is the major subset of a GPS coordinate (http://en.wikipedia.org/wiki/Global_Positioning_System), the other parts being the altitude and t…
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

688 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