May 30, 2004 10:51 PM
feedvalidator has been declaring my RSS as invalid because the date and time generated weren't in the ISO 8601 format. The emacs lisp manual claims (format-time-string "%Y-%m-%dT%T%z") is ISO 8601. Sadly, %z (time zone) generated is of the form +0530 and feedvalidator insists it has to be of the form +05:30. It can be fixed with the following inelegant elisp code:

  (nth 2 (car files)))
 (substring (format-time-string "%z") 0 3) 
 (substring (format-time-string "%z") 3))

Sure, you can always concat a +05:30 with the string, but where's the fun in that?


Copyright © 2004-2011 Anirudh Sasikumar. All rights reserved.
Last Updated: January 21, 2005 4:36 PM