Help for this page

Select Code to Download


  1. or download this
    my $date = "2008-10-29";
    
    my $http_date = time2str( str2time($date) );   # Tue, 28 Oct 2008 23:0
    +0:00 GMT
    
  2. or download this
    str2time("2008-10-29",   "GMT")   # --> Wed, 29 Oct 2008 00:00:00 GMT
    str2time("2008-10-29", "-0800")   # --> Wed, 29 Oct 2008 08:00:00 GMT
    str2time("2008-10-29", "+0100")   # --> Tue, 28 Oct 2008 23:00:00 GMT