Help for this page

Select Code to Download


  1. or download this
    use Date::Format;
    print time2str('%a, %d %b %Y %H:%m:%S GMT', time()), "\n";
    
  2. or download this
    [% USE date %]
    
    <pubDate>[%- gmt = item.created_time -%]
    [%- date.format(gmt, '%a, %d %b %Y %H:%m:%S GMT') -%]</pubDate>
    
  3. or download this
    use Date::Calc;
    my $item_time =
        Date::Calc::Mktime
    ...
          /^(\d\d\d\d)\D*(\d\d)\D*(\d\d)\D*(\d\d)\D*(\d\d)\D*(\d\d)$/ );
    
    print time2str('%a, %d %b %Y %H:%m:%S GMT', $item_time), "\n";