https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5653
Summary: Display "Day of Year" for January 1 as 1, not 0
Product: Wireshark
Version: SVN
Platform: Other
OS/Version: Mac OS X 10.6
Status: NEW
Severity: Major
Priority: Low
Component: Wireshark
AssignedTo: wireshark-bugs@xxxxxxxxxxxxx
ReportedBy: parrisimo@xxxxxxxxx
Created an attachment (id=5890)
--> (https://bugs.wireshark.org/bugzilla/attachment.cgi?id=5890)
Display "Day of Year" for January 1 as 1, not 0
Build Information:
Paste the COMPLETE build information from "Help->About Wireshark", "wireshark
-v", or "tshark -v".
--
In to_str.c, the abs_time_to_str and abs_time_secs_to_str functions creates a
string for display using gmtime. This patch affects those using the
"ABSOLUTE_TIME_DOY_UTC" conversion case.
The tm_yday "Day of Year" parameter is defined by gmtime as "The number of days
since January 1, in the range 0 to 365" so the tm_yday parameter equals zero
for January 1. Similarly, the tm_year "Year" is defined as "The number of
years since 1900" so the tm_year parameter equals zero for 1900.
Within the abs_time_to_str function, 1900 is added to the tm_year parameter,
but 1 is not added to the tm_yday. I'm used to seeing the day of the year
equal to 1 on January 1st. Does anyone use 0 for January 1?
--
Configure bugmail: https://bugs.wireshark.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.