php date change to 12 hour format and add gmt +3 -


i using date as:

 $date = date('m-d-y h:i:s'); 

this inserts 24 hour , want 12 hour format , add gmt +3, how can that?

if want gmt +3 timezone, apply this:

date_default_timezone_set('etc/gmt+3'); 

although don't recommend because php will not longer support timezone. might use one of supported ones. , date being in 12-hour format use way:

$date = date('m-d-y h:i:s'); 

lowercase h format character for

12-hour format of hour leading zeros


Comments

Popular posts from this blog

java - JavaFX 2 slider labelFormatter not being used -

Detect support for Shoutcast ICY MP3 without navigator.userAgent in Firefox? -

web - SVG not rendering properly in Firefox -