Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#13533 closed patch (fixed)

Birthday in ICQ profile may be one day off because of daylight savings time

Reported by: dustin Owned by: MarkDoliner
Milestone: 2.8.0 Component: ICQ
Version: 2.7.11 Keywords: birthday profile dst daylight savings


(minor bug)

The birthday date shown in the ICQ profile (Buddy information) may be one day earlier or later than what it actually is.

Currently, between 23h and 0h the date is incremented by one day. This is the case for dates in summer time (daylight savings time). For example, May 01 will be shown as May 02.

Also tested the reverse case: In summer time (between 0h and 1h) the date is decremented by one day for dates that lie in winter time. For example, March 01 is shown as Feb 28 then.

I think the problem is that the tm struct still contains the hour and dst information of the current time. In case today and birthday are not in the same dst period, mktime() will convert dst and time to the "correct" setting and introduce a timeshift.

It should be sufficient to switch tm_isdst to -1, i.e. "dst information is not known" (worked for me).

Otherwise, the time could be changed to 12:00:00 to avoid trouble.

System used:

  • Ubuntu Linux 09.10
  • time zone: CET +0100 (central european time) / CEST +0200

Attachments (1)

icq-birthday_daylightsavingtime.patch (764 bytes) - added by dustin 8 years ago.
Patch: Current dst should be ignored when birthday time is calculated

Download all attachments as: .zip

Change History (4)

Changed 8 years ago by dustin

Patch: Current dst should be ignored when birthday time is calculated

comment:1 Changed 8 years ago by Robby

  • Milestone set to Patches Needing Review
  • Type changed from defect to patch

comment:2 Changed 8 years ago by dzlists@…

  • Milestone changed from Patches Needing Review to 2.8.0
  • Resolution set to fixed
  • Status changed from new to closed

(In 62ec560595fe543af91f56e2209abd13124bd883):
Ignore DST when calculating birthdays. This prevents an off-by-one-day condition. Fixes #13533.

comment:3 Changed 8 years ago by rekkanoryo@…

(In 2db03c68d8ed3254d2b792db6248e9a587266bee):
ChangeLog dustin's patch. Still need a proper name to credit him with, though. Refs #13533.

Note: See TracTickets for help on using tickets.
All information, including names and email addresses, entered onto this website or sent to mailing lists affiliated with this website will be public. Do not post confidential information, especially passwords!