Monthly Archives: February 2016

Quick conversion from UTC to local time in PHP

I ran across something in a work project where I was required to convert all times stored in UTC to the client’s local time zone. All of the PHP solutions involved multiple lines of code involved the DateTime and DateTimeZone classes, so in order to simplify that, I came up with the following: $formatUTCDateTime = […]