New Calendar.parse specifier for seconds since Epoch
Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=3516
Reported by Dan Nelson dnelson_1901@yahoo.com
To make a logfile searcher I am writing easier to process, I need to be able to parse squid logfile timestamps which use time_t.fraction format:
1065019763.300 796 199.67.51.207 TCP_MISS/200 9401 GET http://community.roxen.com/crunch/ - DIRECT/194.52.182.5 text/html
The current %s format doesn't work because that allows only 0-59, and also is relative from now().
The attached patch lets you do:
> Calendar.parse("%S.%f","1065019763.300");
(8) Result: Fraction(Wed 1 Oct 2003 9:49:23.300000 CDT)