in reply to Re^3: changing time date format.
in thread changing time date format.

Ok, I got it to work, one more question For some reason I can run it from the shell but when I incorporate it into my script it crashes it. and only crashes it from a browser, what am I missing?
{ 
use Date::Parse;
use Date::Format;
use Date::Language;

 $format    = '%A, %B %o %l:%M%p';
 $language  = Date::Language->new('English');

## Start
 $date_time = '08/24/06 09:30';
 $time      = $language->str2time( $date_time );     # 1. Parse
 $newtime   = $language->time2str( $format, $time ); # 2. Output

{
print "$newtime\n";
}
}

Replies are listed 'Best First'.
Re^5: changing time date format.
by davorg (Chancellor) on Aug 22, 2006 at 13:56 UTC

    Could be any number of things. It'll be brought about by the fact that your web server runs scripts under a different user, so the environment will be different.

    What do you mean by "crashes"? Does it crash your browser? If you're seeing a 500 error then there will almost certainly be more useful information in the web server error log.

    --
    <http://dave.org.uk>

    "The first rule of Perl club is you do not talk about Perl club."
    -- Chip Salzenberg