In the RSS protocol, time field format requirements

Date now = Calendar.getInstance().getTime();
DateFormat format = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss Z");
format.setTimeZone( TimeZone.getTimeZone("GMT+8"));

System.out.println(format.format(now));

Get Beijing time, in accordance with rfc822 standard time format.

If you get the Chinese time, you can use String.format to format again, refer to the following:

System.out. println(String.format(Locale.US, "%ta %tb",now,now));

WordPress database error: [Table 'yf99682.wp_s6mz6tyggq_comments' doesn't exist]
SELECT SQL_CALC_FOUND_ROWS wp_s6mz6tyggq_comments.comment_ID FROM wp_s6mz6tyggq_comments WHERE ( comment_approved = '1' ) AND comment_post_ID = 1792 ORDER BY wp_s6mz6tyggq_comments.comment_date_gmt ASC, wp_s6mz6tyggq_comments.comment_ID ASC

Leave a Comment

Your email address will not be published.