<?php
$timestamp = new DateTime('00:30:00', new DateTimeZone('Europe/Dublin'));
// time when you fetched the UTC time ^^^^^^^^
$timestamp->setTimezone(new DateTimeZone('UTC'));
$timestamp->setTime($hours, $minutes, $seconds);
echo $timestamp->format('Y-m-d H:i:s');
Warning: Undefined variable $hours in /in/PjvKa on line 6
Warning: Undefined variable $minutes in /in/PjvKa on line 6
Warning: Undefined variable $seconds in /in/PjvKa on line 6
Deprecated: DateTime::setTime(): Passing null to parameter #1 ($hour) of type int is deprecated in /in/PjvKa on line 6
Deprecated: DateTime::setTime(): Passing null to parameter #2 ($minute) of type int is deprecated in /in/PjvKa on line 6
Deprecated: DateTime::setTime(): Passing null to parameter #3 ($second) of type int is deprecated in /in/PjvKa on line 6
2014-08-18 00:00:00
Output for 8.0.0 - 8.0.30
Warning: Undefined variable $hours in /in/PjvKa on line 6
Warning: Undefined variable $minutes in /in/PjvKa on line 6
Warning: Undefined variable $seconds in /in/PjvKa on line 6
2014-08-18 00:00:00
Notice: Undefined variable: hours in /in/PjvKa on line 6
Notice: Undefined variable: minutes in /in/PjvKa on line 6
Notice: Undefined variable: seconds in /in/PjvKa on line 6
2014-08-18 00:00:00
Output for 7.3.32 - 7.3.33
2014-08-18 00:00:00
Output for 5.2.0 - 5.2.17, 5.3.0 - 5.3.29
Notice: Undefined variable: hours in /in/PjvKa on line 6
Notice: Undefined variable: minutes in /in/PjvKa on line 6
Notice: Undefined variable: seconds in /in/PjvKa on line 6
2015-10-12 00:00:00
Output for 5.0.0 - 5.0.5, 5.1.0 - 5.1.6
Fatal error: Class 'DateTime' not found in /in/PjvKa on line 3
Process exited with code 255.
Output for 4.3.2 - 4.3.11, 4.4.0 - 4.4.9
Fatal error: Cannot instantiate non-existent class: datetime in /in/PjvKa on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Cannot instantiate non-existent class: datetime in /in/PjvKa on line 3