Directory listing / sort by last modified does not work on Safari
On Safari, Date.parse(at.replace(/-/g, '/')) results in NaN if at is s.th. like "2017-Oct-01 12:34:56"
Date.parse() expects "Oct 01, 2017 12:34:56"
Attached patch is suggested for latest git checkout
[mod_dirlisting] custom js date parse func (fixes #2823)
lighttpd mod_dirlisting produces a directory listing with the date in a
certain format, and lighttpd calls setlocale(LC_TIME, "C"), so strftime
date used in mod_dirlisting is predictable. Use a custom date parse
"Directory listing / sort by last modified does not work on Safari"
Updated by gstrauss about 2 years ago
HTML5 provides <time> tag, but we'd like to work with (some) older browsers, too.
Does Safari support a simplified ISO 8601 format? e.g. Date.parse("2017-Oct-01 12:34:56") or Date.parse("2017-Oct-01T12:34:56") ?
[edit: the above examples I gave are not ISO 8601 since they use "Oct" instead of "10"]
... Seems like many people recommend a custom date parse routine rather than using Date.parse().
I like stbuehler suggestion to use custom cell attribute data-time and to sort on that. Using an HTML-compliant custom attribute should be compatible with existing behavior.
Also available in: Atom