Change time format to AM/PM or 24hours

Santiago Romero sromero@servicom2000.com
Tue, 28 Aug 2001 08:12:44 +0200


 Hi!

 I wanted all the messages (including the current day messages) to
 show the entire date + hour (not just the hour as shown in today's
 messages), so I modifyed mailbox.php3 in this way:

            $msgdate = strtotime($h->date);
  //   if ((date('Y', $msgdate) != date('Y')) ||
  //       (date('M') != date('M', $msgdate)) ||
  //       (date('d') != date('d', $msgdate))) {
  //         not today, use the date
         //    $dat = strftime($default->date_format, $msgdate);
      $dat = "<font size=-2>" . strftime($default->date_format, $msgdate)
          . " " . strftime($default->time_format, $msgdate) . "</font>";

  //    } else { // else it's today, use the time
  //    $dat = strftime($default->time_format, $msgdate);
  // }

 That's: I allways get the entire date as I wanted but I don't get it
 on a 24 hours format, I get 11:00 instead of 23:00 so when I see a
 message dated "11/08/2001 11:01" I don't know if that's 11AM or
 11PM (11 or 23)...

 Can the AM/PM or 24hour-format be displayed?

 Another related question... is there any function to format the
 message date displayed on message.php3 (on the Date: field when you
 read a message) so that it translates the date to spanish?

 (Mon, 23 Jun 2001) -> Lun, 23 Jun 2001

 Thank your for any help.
-- 
Santiago Romero
Departamento de Sistemas
sromero@servicom2000.com

Av. Primado Reig 189, entlo
46020 Valencia - Spain
Telf. (+34) 96 332 12 00
Fax. (+34) 96 332 12 01
http://www.servicom2000.com