while exporting to the csv file time is showing based on 24
<p>I have a php projec and here i need to export some data from database to the csv. My data contain "Time " and the value is "<code>7.00 PM</code>". But when i export this on cssv it's showing "<code>19.00</code>". But i want to show "<code>7.00 PM</code>"
Here is some portion of the Code  </p>

<pre><code>$out  .= '"'.$val['first_name'].'",';
$out  .= '"'.$val['second_name'].'",';
$out  .= '"'.$val['pgm_time'].'",';
$f = fopen ('registered_users.csv','w');

// Put all values from $out to export.csv. 
fputs($f, $out);
fclose($f);

header('Content-type: application/csv');
header('Content-Disposition: attachment; filename="registered_users.csv"');
readfile('registered_users.csv');
</code></pre>

<p>I have just output all these value, then it's shows correct time (7.00 Pm). but after exporting it shows 19.0 . Also my database contains teh correct value (7.00 Pm)
I have checked this in different system. In some system it's OK. But in some it's shows 19.00.. May be the version of the Microsoft or may be any inner setting of the editor. I don't know why this happen ?</p>

<p>I need a solution to show the time as based on 12 hrs ie 7.00 PM  in all the system (independent of editor)</p>

<p>Does any one know .. or any other good code .Please help me ...</p>

<p>Thanks </p>
