I want to convert a date like
Sat Dec 31 22:42:58 CET 2011
to a valid rss date which normaly looks like
Mon, 06 Sep 2009 16:45:00 +0000
Seconds should always be 00. Is there anyway to do so? Besides it would be could to find out the current as a valid rss but that’s optional 😉
Update
With your new sample input, you don’t even need to reformat. It’s as simple as
The trick is to reformat your date into a string that
datecan understand and take as input. In this case it is2011-12-31 13:37. I’m usingawkto do this, but there are number of different utilities that will suffice.Output