Click here to get back home

military time with Date::Calc

 HomeNewsGroups | Search | About
 comp.lang.perl.modules    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
military time with Date::Calc Schmidty 06-09-2005
Posted by Schmidty on June 9, 2005, 1:09 am
Please log in for more thread options


Hi...Does anyone know if you can convert standard 12 hour time (am/pm)
to military time (24 hours) with the Date::Calc module? I wrote a script
that would do it but really like to usability of Date::Calc. Could
this be rewritten into the module later on?

Schmidty


Posted by Peter Billam on June 10, 2005, 10:03 am
Please log in for more thread options


> Hi...Does anyone know if you can convert standard 12 hour time (am/pm)
> to military time (24 hours) with the Date::Calc module? I wrote a script
> that would do it but really like to usability of Date::Calc. Could
> this be rewritten into the module later on?

Is it just the plain old civilian 24-hour clock that's intended ?
Nothing military about that, it's used everywhere in Europe, for
example.

I've heard that military time differs by forbidding the midnight
minute 00:00 and 24:00 because this has been known to cause confusion
about which day it is. So it goes straight from 23:59 to 00:01.
I'm not sure how that's done, in detail ...

Regards, Peter

--

Peter Billam, DPIWE/CIT/Servers, hbt/lnd/l8, 6233 3061


Posted by Schmidty on June 9, 2005, 7:23 pm
Please log in for more thread options


Peter Billam wrote:
>
>>Hi...Does anyone know if you can convert standard 12 hour time (am/pm)
>>to military time (24 hours) with the Date::Calc module? I wrote a script
>>that would do it but really like to usability of Date::Calc. Could
>>this be rewritten into the module later on?
>
>
> Is it just the plain old civilian 24-hour clock that's intended ?
> Nothing military about that, it's used everywhere in Europe, for
> example.
>
> I've heard that military time differs by forbidding the midnight
> minute 00:00 and 24:00 because this has been known to cause confusion
> about which day it is. So it goes straight from 23:59 to 00:01.
> I'm not sure how that's done, in detail ...
>
> Regards, Peter
>
Yeah...it would be the standard 24 hour format (00:00:00 to 23:59:59). I
wrote some Perl code that easily differentiates between the two but I
was hoping the Date::Calc module might have a way of converting back and
forth or maybe there might be another module out there. I find it hard
to believe that they wouldn't include this...thanks.

Schmidty


Posted by John W. Krahn on June 10, 2005, 11:07 am
Please log in for more thread options


Peter Billam wrote:
>
>>Hi...Does anyone know if you can convert standard 12 hour time (am/pm)
>>to military time (24 hours) with the Date::Calc module? I wrote a script
>>that would do it but really like to usability of Date::Calc. Could
>>this be rewritten into the module later on?
>
>
> Is it just the plain old civilian 24-hour clock that's intended ?
> Nothing military about that, it's used everywhere in Europe, for
> example.
>
> I've heard that military time differs by forbidding the midnight
> minute 00:00 and 24:00 because this has been known to cause confusion
> about which day it is. So it goes straight from 23:59 to 00:01.
> I'm not sure how that's done, in detail ...

Also military time is designated as Zulu Time and is always UTC, e.g. 23:16 Z
which is the same as 23:16 UTC (or 23:16 GMT.)


John
--
use Perl;
program
fulfillment


Similar ThreadsPosted
problems with Date-Calc July 8, 2004, 3:09 pm
Date::Calc install September 8, 2004, 10:02 am
Date::Calc Problem February 9, 2006, 12:25 am
Date and time--recommended module? November 8, 2006, 3:41 pm
Sanity check: Date::Manip versus summer time January 24, 2006, 6:20 pm
Date::MSAccess V 1.01 July 29, 2004, 7:15 am
perl date manipulation October 21, 2004, 5:02 pm
ANNOUNCE: Date::MSAccess V 1.02 February 14, 2005, 10:44 am
Date::Simple confusion May 8, 2005, 6:10 pm
Use of uninitialized value in numeric lt (<) at /Date/Manip.pm September 16, 2008, 12:58 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap