ring
ring copied to clipboard
Last-Modified date format wrong in file-info namespace
The date format in file_info.clj for static files: EEE, dd MMM yyyy HH:mm:ss ZZZ, is incorrect. ZZZ should be z. This makes an rfc 1123 standard date:
Wed, 08 Jun 2016 03:08:48 GMT
Also, set the timezone to GMT not UTC.
So the lines (in file_info.clj):
(doto (SimpleDateFormat. "EEE, dd MMM yyyy HH:mm:ss ZZZ" Locale/US)
(.setTimeZone (TimeZone/getTimeZone "UTC"))))
should become:
(doto (SimpleDateFormat. "EEE, dd MMM yyyy HH:mm:ss z" Locale/US)
(.setTimeZone (TimeZone/getTimeZone "GMT"))))
Thanks for the report. The date format is correct elsewhere, but file-info was overlooked because it's been deprecated for years. The file-info namespace should now make use of ring.util.time.