1

Here i have a date entry as by default mysql

Input: '2017-03-9 06:27:28'

Output: '2017-03-9 11:27:28'

i want to convert this time using php in GMT +5 format please help me the function to solve this

Sahil Gulati
  • 15,028
  • 4
  • 24
  • 42
Mudassar Zahid
  • 305
  • 2
  • 14

1 Answers1

2

PHP code demo

$string=strtotime("2017-03-9 06:27:28"); //converting time to timestamp
$timestamp=strtotime("+5 hours",$string);//added zone time
echo date("Y-m-d H:i:s", $timestamp); //displaying new time
Sahil Gulati
  • 15,028
  • 4
  • 24
  • 42