Click here to Skip to main content
15,891,409 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

How to caluculete difference between two dates based on selected timezones in php
Posted
Comments
Prasad Khandekar 25-Mar-13 8:43am    
Hello,

It's done as shown below.

// Create timezone
$gmtTz = new DateTimeZone('GMT');

$dateFirst = new DateTime('2009-03-21 13:14', $gmtTz);

Once you get your date in timezone you can then perform usual operations.
Sandeep Mewara 25-Mar-13 12:29pm    
Tried anything so far?

1 solution

 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900