Last Comment Bug 522992 - NSPR logging timestamp month number is off by one
: NSPR logging timestamp month number is off by one
Product: NSPR
Classification: Components
Component: NSPR (show other bugs)
: other
: x86 Windows XP
-- normal (vote)
: 4.8.3
Assigned To: Wan-Teh Chang
Depends on:
  Show dependency treegraph
Reported: 2009-10-18 17:15 PDT by WADA:World Anti-bad-Duping Agency
Modified: 2009-10-31 10:27 PDT (History)
1 user (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---

A patch (1.04 KB, patch)
2009-10-19 20:54 PDT, Hiroyuki Ikezoe (:hiro)
wtc: review+
Details | Diff | Splinter Review

Description User image WADA:World Anti-bad-Duping Agency 2009-10-18 17:15:38 PDT
[Build Id]
> Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.3a1pre) Gecko/20091018 Minefield/3.7a1pre (.NET CLR 3.5.30729)

Following is first NSPR log line with all:5,timestamp. NSPR log was taken at 2009/10/19 09:04 +0900 (JST).
> 2009-09-19 00:04:36.221000 UTC - 0[833140]: Loaded library Executable (init)
JavaScript is used and "0 to 11" for month of Date object is directly used?
Comment 1 User image Nelson Bolyard (seldom reads bugmail) 2009-10-18 20:08:29 PDT
The complaint is that the date which appeared in the log bore the month number
09, when it should have been 10.
Comment 2 User image Wan-Teh Chang 2009-10-19 20:17:30 PDT
Wada, thanks for the bug report.  This bug is easy to fix.  Just
add 1 to now.tm_month here:

Could you write a patch and test it?  Thanks.
Comment 3 User image WADA:World Anti-bad-Duping Agency 2009-10-19 20:32:39 PDT
Sorry but I can't write patch, although I can guess "now.tm_month -> ++now.tm_month" will solve problem.
Comment 4 User image Wan-Teh Chang 2009-10-19 20:34:18 PDT
Just change
  now.tm_month + 1
Comment 5 User image Hiroyuki Ikezoe (:hiro) 2009-10-19 20:54:05 PDT
Created attachment 407204 [details] [diff] [review]
A patch

Created a trivial path. Sorry for my fault.
Comment 6 User image Wan-Teh Chang 2009-10-20 20:23:37 PDT
Comment on attachment 407204 [details] [diff] [review]
A patch

r=wtc.  Thank you, Hiroyuki.
Comment 7 User image Wan-Teh Chang 2009-10-31 10:27:07 PDT
I checked in the patch on the NSPR trunk (NSPR 4.8.3).

Checking in pr/src/io/prlog.c;
/cvsroot/mozilla/nsprpub/pr/src/io/prlog.c,v  <--  prlog.c
new revision: 3.51; previous revision: 3.50

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