http://qs321.pair.com?node_id=182257


in reply to Getting "A.M." and "P.M." with localtime $time

It's not military time. It's 24 hour notation, which is virtually a world standard. Like the metric system and coloured money.
use POSIX 'strftime'; my $time = strftime("%r", localtime()); print $time,"\n";
If you're getting the wrong time out, that's because your time-zone is set incorrectly. Check the output of your 'date' command, or if you're using something that uses these things they call "Control Panels", check there.

Replies are listed 'Best First'.
Re: Re: localtime $time
by mt2k (Hermit) on Jul 17, 2002 at 05:28 UTC
    Ooh! Ooh! Time for me to make fun of the Americans! Actually, tadman pointed out the funny part, but I shall simply point it out for all to see:

    tadman: ...virtually a world standard. Like the metric system

    What's so funny about this? Well if I recall correctly, the United States is one of the few (if not the only) country that still uses the imperial system! Update yourselves Americans and use the metric system! Heheh... I am prepared for the barrage of downvotes coming my way... one should never make fun of the out of date cool Americans!

      Time for me to make fun of the Americans!
      Um... mtk, last I checked Canada was in America. So is Mexico and the United States. If I'm not mistaken, you're from Canada. Oh well, we know what you mean. ;-)

      Update yourselves Americans and use the metric system!
      Well, we mesure soda pop bottles in liters: 3, 2, 1, .5. Our cars have KM rate measurements (as well as MPH). But, do you really think we can convert all measurements to metric? That'd be harder than change currency to the Euro.