in reply to Converting timestamp to RSS pubDate
The target date with HTTP::Date is always in GMT... So, here's another suggestion:
use Date::Manip; my $date = "2008-11-03 19:03:44"; Date_Init("TZ=EST"); my $http_date = UnixDate(ParseDate("$date -0612"), "%a, %d %b %Y %H:%M +:%S %Z"); print "$http_date\n"; # Mon, 03 Nov 2008 20:15:44 EST
Not fully matching your requirement, but close :) — Adjust the input time zone (-0612) as appropriate.
(If you seriously want to go from 19:03:44 to 20:15:00, look into the other functionality that Date::Manip has to offer for calculating with dates...)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Converting timestamp to RSS pubDate
by htmanning (Friar) on Nov 04, 2008 at 01:51 UTC | |
by almut (Canon) on Nov 04, 2008 at 02:09 UTC |