Closed Bug 293742 Opened 20 years ago Closed 20 years ago

incorrect grouping of message in group view & incorrect day selection if the short date display option is selected

Categories

(Thunderbird :: Mail Window Front End, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: petres, Assigned: petres)

Details

Attachments

(2 files, 5 obsolete files)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.7) Gecko/20050414 Firefox/1.0.3
Build Identifier: version 1.0.2 (20050317)

All the dates of the messages are displayed in local time, but Thunderbird
calculates the time according to GMT. If someone stays in a country where the
time difference is big (eg. Japan is GMT+0900) then it can happen that some
messages time is shown as yesterday, but grouped is the last week section.

The same error is in the date show case, if we select that we want to see the
day and the time (eg. Thu 12.20 PM) instead of the full date, then the end of
the week calculated inproperly.

When we calculate the last midnight in sec, last week's midnight in sec etc.
first we have to modify the received GMT time to the actual time zone.

Reproducible: Always

Steps to Reproduce:
Get messages, select grouping. If you are lucky, then you can see. See pic attached.
Actual Results:  
Incorrect grouping. The third message is in wrong place.

Expected Results:  
Correct grouping. Third message is in yesterday section.
Attached image Bad grouping example
Attached patch Patch for the GroupView problem (obsolete) — Splinter Review
thx a lot for looking into this - can you attach -uw diffs so I can see the context?
Attachment #183271 - Attachment is obsolete: true
Attachment #183272 - Attachment is obsolete: true
Comment on attachment 183288 [details] [diff] [review]
Patch for the Short Date for the last week problem (more verbose)

looks right to me. I'll run with this patch.
Attachment #183288 - Flags: superreview?(neil.parkwaycc.co.uk)
Attachment #183288 - Flags: review+
Comment on attachment 183290 [details] [diff] [review]
Patch for the GroupView problem (more verbose)

oops, I believe we need to use the LL macros here, and in the previous patch.
Attachment #183290 - Flags: superreview?
Attachment #183290 - Flags: review?
Comment on attachment 183288 [details] [diff] [review]
Patch for the Short Date for the last week problem (more verbose)

minusing - need the LL macros here too (or use nsInt64) Do you want to try
this, Zolton, or do you want me to?
Attachment #183288 - Flags: superreview?(neil.parkwaycc.co.uk)
Attachment #183288 - Flags: review-
Attachment #183288 - Flags: review+
(In reply to comment #9)
> (From update of attachment 183288 [details] [diff] [review] [edit])
> minusing - need the LL macros here too (or use nsInt64) Do you want to try
> this, Zolton, or do you want me to?
> 

Well. I am not really familiar with Mozilla's LL macros. I've recognized that
the two file uses different guidelines, DBView only use those, GroupView does
not. If you can hack my code to conform to the guidelines, I would really
appreciate.

Zoltan
Comment on attachment 183288 [details] [diff] [review]
Patch for the Short Date for the last week problem (more verbose)

You also need to allow for the dst_offset. I'm in BST so my gmt_offset is zero
but between midnight and 01:00 I see 7-day-old messages using today's day.
(In reply to comment #11)
> (From update of attachment 183288 [details] [diff] [review] [edit])
> You also need to allow for the dst_offset. I'm in BST so my gmt_offset is zero
> but between midnight and 01:00 I see 7-day-old messages using today's day.
> 

I agree. I forgot to take account of daylight saving, but it is true, we have
add this too to get the real local time.

David, please, add the tp_dst_offset to the message and current time, when you
update the diff to makei it Mozilla conform.

Zoltan
Might as well confirm this, as there's a patch in progress.  I believe there's 
another bug somewhere that mentions this same symptom.
Assignee: mscott → petres
Status: UNCONFIRMED → NEW
Ever confirmed: true
(In reply to comment #13)
> Might as well confirm this, as there's a patch in progress.  I believe there's 
> another bug somewhere that mentions this same symptom.

I've found the bug 263678. It mentions this problem, but others too I have not
experienced. I guess those should be reconsidered after this patch.
I rewritten the code with LL macros.
Attachment #183288 - Attachment is obsolete: true
Attachment #183290 - Attachment is obsolete: true
Attachment #183587 - Flags: review?(bienvenu)
Status: NEW → ASSIGNED
Comment on attachment 183587 [details] [diff] [review]
Rewritten patch according to reviewer's comment

thx for using the macros. I wish we didn't have to use them. - using nsInt64
might make the code easier to read but I can worry about that some other time.
Attachment #183587 - Flags: superreview?(neil.parkwaycc.co.uk)
Attachment #183587 - Flags: review?(bienvenu)
Attachment #183587 - Flags: review+
Comment on attachment 183587 [details] [diff] [review]
Rewritten patch according to reviewer's comment

sr=me if you change the tabs back into spaces.
Attachment #183587 - Flags: superreview?(neil.parkwaycc.co.uk) → superreview+
Tab problems corrected
Attachment #183587 - Attachment is obsolete: true
Attachment #183821 - Flags: superreview?(neil.parkwaycc.co.uk)
Attachment #183821 - Flags: superreview?(neil.parkwaycc.co.uk) → superreview+
Attachment #183821 - Flags: approval-aviary1.1a2?
Can someone commit the patch? I does not have the rights.
Comment on attachment 183821 [details] [diff] [review]
Rewritten patch according to reviewer's comment #2

a=shaver
Attachment #183821 - Flags: approval-aviary1.1a2? → approval-aviary1.1a2+
fixed on trunk, will be in 1.1a2, thx, Zoltan.
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Comment on attachment 183290 [details] [diff] [review]
Patch for the GroupView problem (more verbose)

clearing old request
Attachment #183290 - Flags: superreview?
Attachment #183290 - Flags: review?
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: