Mike Orr avatar Mike Orr committed 0204413

Bugfix in webhelpers.feedgenerator.rfc3339_date().

Comments (0)

Files changed (2)

 1.0b1 (tip)
 * Delete deprecated subpackages: rails.
 * Delete other deprecated subpackages: commands, hinclude, htmlgen, pagination.
-* paginate : convert "_range" and "_pagelink" function to Page class method 
-  so that they can be overridden
-* paginate : pager "onclick" argument use template string value. So, javascript code 
-  can use "partial_url" or "page" value or any. Backward compatibility
-  is considered.
+* webhelpers.feedgenerator:
+  - ``rfc3339_date`` now accepts date objects without crashing.
+* webhelpers.paginate:
+  - convert "_range" and "_pagelink" function to Page class method so that they
+    can be overridden
+  - pager "onclick" argument use template string value. So, javascript code can
+    use "partial_url" or "page" value or any. Backward compatibility is
+    considered.
 
 0.6.4 (12/2/2008)
 * text(), password(), checkbox(), textarea(), and select() have a

webhelpers/feedgenerator.py

     return email.Utils.formatdate(time.mktime(date.timetuple()))
 
 def rfc3339_date(date):
-    if date.tzinfo:
+    if getattr(date, "tzinfo", False):
         return date.strftime('%Y-%m-%dT%H:%M:%S%z')
     else:
         return date.strftime('%Y-%m-%dT%H:%M:%SZ')
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.