Php strftime


#1

Hi there, I’m using strftime this way: “%B %e, %Y - %l:%M %P”, should give something like this: December 8, 2006 - 6:30 am… but from some reason the am (or pm) isn’t appear… instead i get: December 8, 2006 - 6:30

any idea what is missing ?

(i’m using php5…)


#2

The “am/pm” conversion specifier needs to be a lowercase “p” (%p), according to the manual.


Simon’s website
Save $100 on 1-year plans with promo code [color=#CC0000]SCJESSEY100[/color] (details)


#3

scjessey, I know that, %P should return am/pm in
lowercase characters (%p = AM/PM)

neither are working…


#4

It works for me: http://jessey.net/tests/php/time_test.php - same string as you posted.


Simon’s website
Save $100 on 1-year plans with promo code [color=#CC0000]SCJESSEY100[/color] (details)


#5

Could this be a php4/5 issue?

Wholly


#6

PHP4: http://jessey.net/tests/php/time_test.php
PHP5: http://keystonewebsites.com/tests/time_test.php

No problems for me.


Simon’s website
Save $100 on 1-year plans with promo code [color=#CC0000]SCJESSEY100[/color] (details)


#7

My .02$ is used up.

Wholly


#8

Strange… not working for me… I’ll check it later again


#9

I had this trouble too, but I fixed it by doing

setlocale(LC_ALL ,"");

before the date code