Question: I have gone through many timezone/PHP posts, and most suggest storing your datetime fields in UTC, then using the application users timezone offset when storing and displaying datetime information. 

The problem i have I've inherited an application that wasn't timezone aware, and now I need to cater for this.

The server is already set to `"EST +11:00 Australia/Melbourne"`, and there are already applications running from that server. So i can't change this.

Fortunately, I do know a users timezone offset, ie `-05:00`, etc,.

The application takes Javascript Dates and parses them using PHP's `strtotime()` function and stores in a MySQL database, like this:

```
$event_starts = date('Y-m-d H:i:s', 
    strtotime('Thu Dec 02 2010 11:15:00 GMT+1100 (AUS Eastern Daylight Time)');

```

So does anyone have any suggestions for the best way on how I can make this application timezone aware considering the server isn't set to UTC? 

Many thanks, J.

Answer: 
The important thing to keep in mind is not UTC, but that all times stored must be standardized to one timezone. So, if your PHP server and your database server both use the same timezone, the only issue that arises is when you need to display a location-aware time to the user or when you allow a user to enter a datetime from another timezone.

PHP has a nice, though somewhat scantly documented class, called [DateTime](http://ca2.php.net/manual/en/class.datetime.php). And some ancillary classes like [DateTimeZone](http://ca2.php.net/manual/en/class.datetimezone.php), DateInterval, etc. These make converting from db time to user time pretty simple.
For working with datetime in different timezones and formats you can try to use PHP library [Dater](https://github.com/barbushin/dater) (<https://github.com/barbushin/dater>). Cheers!