-
Website
http://www.tech-recipes.com/ -
Original page
http://www.tech-recipes.com/rx/1461/get-mysql-date-in-rfc-822-format-for-rss-feeds/ -
Subscribe
All Comments -
Community
-
Top Commenters
-
davak
83 comments · 1 points
-
Web Design
3 comments · 1 points
-
danishbacker
9 comments · 1 points
-
flexinfo
11 comments · 1 points
-
Tonychelle
4 comments · 1 points
-
-
Popular Threads
-
Facebook: How To Get Only Status Updates on Your FB Home Page
1 week ago · 4 comments
-
Firefox: Enable Case Sensitive Searches When Using Find (Ctrl+F)
5 days ago · 1 comment
-
Windows 7: How To Disable Live Preview for Taskbar Thumbnails
2 weeks ago · 2 comments
-
Gmail: How to block a sender from your inbox
3 weeks ago · 3 comments
-
Our first iPhone game GreenThumb available in the App Store
3 weeks ago · 2 comments
-
Facebook: How To Get Only Status Updates on Your FB Home Page
You have no idea how long it too me to twig what was wrong...
Tom
SELECT pubdate, DATE_FORMAT(pubdate,'%a, %d %b %Y %T') AS rfcpubdate FROM tablename ORDERBY pubdate DESC
very helpful indeed though
to add the correct timezone formatted in RFC-822 format in Java I found this method. I don't like it too much because it requires to call cal.getTime() everytime but it seems to do what needed.
import java.util.Calendar;
import java.text.SimpleDateFormat;
public class foo{
public static final String DATE_FORMAT_RFC822_TIMEZONE = "Z";
public String getRFC822TimeZone() {
Calendar cal = Calendar.getInstance();
SimpleDateFormat sdf = new SimpleDateFormat(DATE_FORMAT_RFC822_TIMEZONE);
return sdf.format(cal.getTime());
}
}