View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0003898 | unreal | ircd | public | 2010-04-02 21:15 | 2010-08-26 04:47 |
| Reporter | seraph | Assigned To | |||
| Priority | normal | Severity | minor | Reproducibility | always |
| Status | closed | Resolution | no change required | ||
| Product Version | 3.2.7 | ||||
| Summary | 0003898: Temp GLine: One unneeded Space Character | ||||
| Description | I´ve found an unneeded Space Character: *** G:Line added for *@ggg.net on Fri Apr 2 19:01:23 2010 GMT (from x!~x@x to expire at Fri Apr 2 22:01:23 2010 GMT: xxx It´s between at "expire at Fri Apr 2" between Apr and 2 | ||||
| Steps To Reproduce | set a temp gline and see yourself | ||||
| 3rd party modules | |||||
|
|
Addition: Same thing at "on Fri Apr 2" |
|
|
I would argue that it is common practice for default timestamps to have the space after the month and day. For instance, asctime looks like this in C: Function: char * asctime (const struct tm *brokentime) The asctime function writes the broken-down time value pointed at by brokentime into a string in a standard format: "Tue May 21 13:46:22 1991\n" /* Get the current time. */ curtime = time (NULL); /* Convert it to local time representation. */ loctime = localtime (&curtime); /* Print out the date and time in the standard format. */ fputs (asctime (loctime), stdout); Prints: "Tue May 21 13:46:22 1991". Which looks exactly like whats in the gline message. This is so you can split the string by spaces, and read each value into code with ease. I think it's even an RFC standard somewhere, but almost all programming languages has this standardized-ish time output. Just my $.02, or .02c if you are verizon. |
|
|
i know but there are TWO spaces in there |
|
|
That's default behavior of asctime. The message you see comes from: timeret = asctime(gmtime((TS *)&setat_1)); - Gets the time in GMT, passes it through asctime strncpyzt(gmt, timeret, sizeof(gmt)); - Copies it to gmt, (after a check to be sure TS is currently valid, due to time desyncs) iCstrip(gmt); - Strips \n and \r, which is appended to the end of the string by asctime snprintf(buf, 512, "%s added for %s@%s on %s GMT (from %s to expire at %s GMT: %s)",txt, parv[3], parv[4], gmt, parv[5], gmt2, reason); - Prepares buf with the message to send to opers asctime does this, so that the following will line up (for logging purposes): "Tue May 1 13:46:22 1991\n" "Tue May 21 13:46:22 1991\n" Edit: Since I can't use HTML, the bug tracker is ignoring a consecutive space (view source) Or here is this version, with space replaced with _: "Tue_May__1_13:46:22_1991\n" "Tue_May_21_13:46:22_1991\n" |
|
|
ah ok, thanks for the explanation, ticket can get closed :) |
|
|
Your welcome, I was a bit confused at first, since again, the bug tracker doesn't show consecutive spaces, so I was initially thinking: Apr2, that's a bit odd ;) But yeah, let's see how many days it takes to get the ticket closed :) |
|
|
12^2 |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2010-04-02 21:15 | seraph | New Issue | |
| 2010-04-02 21:18 | seraph | Note Added: 0016048 | |
| 2010-04-03 11:30 | driew | Note Added: 0016049 | |
| 2010-04-03 12:18 | seraph | Note Added: 0016053 | |
| 2010-04-03 12:29 | driew | Note Added: 0016054 | |
| 2010-04-03 12:31 | driew | Note Edited: 0016054 | |
| 2010-04-03 12:38 | seraph | Note Added: 0016055 | |
| 2010-04-03 12:41 | driew | Note Added: 0016056 | |
| 2010-08-26 04:47 | ohnobinki | QA | => Not touched yet by developer |
| 2010-08-26 04:47 | ohnobinki | U4: Need for upstream patch | => No need for upstream InspIRCd patch |
| 2010-08-26 04:47 | ohnobinki | Note Added: 0016316 | |
| 2010-08-26 04:47 | ohnobinki | Status | new => closed |
| 2010-08-26 04:47 | ohnobinki | Resolution | open => no change required |