New Calendar.parse specifier for seconds since Epoch
Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=3516
Reported by Dan Nelson firstname.lastname@example.org
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 18.104.22.168 TCP_MISS/200 9401 GET http://community.roxen.com/crunch/ - DIRECT/22.214.171.124 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)