Open aspiers opened 7 years ago
Hmm, I thought I'd found the answer to this in src/lnav_util.cc
:
const char *std_time_fmt[] = {
[snipped]
"+%s",
NULL,
};
but it actually appears that nothing uses std_time_fmt
?
Maybe it's instead explained by this part of date_time_scanner::scan()
?
if (time_dest[0] == '+') {
char time_cp[time_len + 1];
int gmt_int, off;
retval = NULL;
memcpy(time_cp, time_dest, time_len);
time_cp[time_len] = '\0';
if (sscanf(time_cp, "+%d%n", &gmt_int, &off) == 1) {
Yes, it's the date_time_scanner that looks for the plus and does a hardcoded parse. Probably old code that should be updated at some point here.
The default
tcsh_history
format has:Why is the
+
character inside the<timestamp>
capture field? What is also strange is that when I move it outside, so that thepattern
begins with^#\\+
, I get:This can be fixed by adding
Why is
+1375138067
recognised as a valid timestamp by default but1375138067
isn't?