Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Last-Modified date format wrong in file-info namespace #245

Open
abellina opened this issue Jun 8, 2016 · 1 comment
Open

Last-Modified date format wrong in file-info namespace #245

abellina opened this issue Jun 8, 2016 · 1 comment
Labels

Comments

@abellina
Copy link

abellina commented Jun 8, 2016

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"))))
@weavejester
Copy link
Member

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.

@weavejester weavejester changed the title Last-Modified date format wrong Last-Modified date format wrong in file-info namespace Jun 8, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants