Bug 3516 - New Calendar.parse specifier for seconds since Epoch
: New Calendar.parse specifier for seconds since Epoch
Status: VERIFIED FIXED
: Pike
Modules
: 7.4
: All All
: P3 (normal) normal
: ---
Assigned To:
:
:
:
  Show dependency treegraph
 
Reported: 2003-10-01 16:56 CET by
Modified: 2003-10-03 21:43 CET (History)
Scrum Prio:
In scrum?: ---
Story included in sprints:
Unplanned in sprints:


Attachments
The patch, for 7.4 and 7.5 (3.25 KB, patch)
2003-10-01 16:57 CET, Dan Nelson
Details | Diff


Description From 2003-10-01 16:56:48 CET
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)
------- Comment #1 From 2003-10-01 16:58:29 CET -------
Created an attachment (id=232) [details]
The patch, for 7.4 and 7.5
------- Comment #2 From 2003-10-01 17:28:52 CET -------
Similar patch applied in both 7.4 and 7.5.
------- Comment #3 From 2003-10-03 21:44:36 CET -------
Thanks for the quick turnaround!

Note

You need to log in before you can comment on or make changes to this bug.