I am using date as:
$date = date('m-d-Y H:i:s');
This inserts it as 24 hour and what I want is 12 hour format and add GMT +3, how can I do that?
I am using date as:
$date = date('m-d-Y H:i:s');
This inserts it as 24 hour and what I want is 12 hour format and add GMT +3, how can I do that?
If you want the GMT +3 timezone, you could apply this:
date_default_timezone_set('Etc/GMT+3');
Although I don't recommend it because PHP will not longer support that timezone. You might use one of the supported ones. And for the date being in 12-hour format use it this way:
$date = date('m-d-Y h:i:s');
Lowercase h
format character is for
12-hour format of an hour with leading zeros