Velocity formatting for an ATOM feed


I have a working RSS content type and template but now I need to make an ATOM template. I am having problems with two areas.

  1. Date format: ATOM uses RFC 3339 formatted timestamps whihc look something like this:


What would be the best method in Velocity to convert our Oracle style timestamps to that format?

  1. Truncating a field: For a summary entry I want to truncate the #field(“description”) to a specific length rather than showing it all. Any suggestions on the best way to do that?