php convert datetime to UTC August 31, 2022 by Tarik Billa Use strtotime to generate a timestamp from the given string (interpreted as local time) and use gmdate to get it as a formatted UTC date back. Example As requested, here’s a simple example: echo gmdate('d.m.Y H:i', strtotime('2012-06-28 23:55')); More Related Contents: What are the “standard” timezone abbreviations? Timezone conversion in php How to find day of week in php in a specific timezone Generating a drop down list of timezones with PHP get UTC time in PHP PHP, MySQL and Time Zones Convert UTC dates to local time in PHP Set timezone in PHP and MySQL php: setting a timezone by UTC offset How to update timezonedb in PHP (updating timezones info)? UTC Date/Time String to Timezone How to tell if a timezone observes daylight saving at any time of the year? Different timezone_types on DateTime object How to convert UTC datetime to another timezone? How to detect Ambiguous and Invalid DateTime in PHP? Display which day it is? sunday or monday “php coding”? [closed] PHP: Return all dates between two dates in an array [duplicate] Finding the number of days between two dates Why can’t I access DateTime->date in PHP’s DateTime class? How we can add two date intervals in PHP Get the date of next monday, tuesday, etc Object of class DateTime could not be converted to string Find Month difference in php? [duplicate] How do I get Greenwich Mean Time in PHP? PHP, Get tomorrows date from date Calculate total seconds in PHP DateInterval Is there a built-in function or plugin to handle date formatting in JavaScript? How to find timezone ID from IP address/country name in PHP? Get a PHP DateTime difference in days, considering midnight as a day change Get date for monday and friday for the current week (PHP)