Modify ↓
Opened 3 years ago Last modified 3 months ago #10 accepted bugDST changes *every* time in main window listview
Description (last modified by damato)
Today when most European countries switched to daylight saving time (DST), I noticed a bug in YAM25dev (am using the version from 27 March for m68k on AMIGA OS3.9BB2):
I have the main window listview configured to show the message date. After switching to DST, all times were increased by one hour, including the ones of mails received during standard time.
This is easy to reproduce:
Begin with DST, GMT+2 in my case, note the times displayed for some mails in a folder received during before (GMT+1) and after (GMT+2) the DST switch. Then uncheck the DST switch in the YAM config-"First steps". All times are changed.
Of course one can always open the mail to get the correct time including time zone info form the Date header field, and one may thus argue that this is a case for a feature request. However, I consider this a bug.
Moved from SF: Attachments (3)Change History (16)comment:1 Changed 3 years ago by damato
comment:2 Changed 3 years ago by damato
comment:3 Changed 3 years ago by damato
comment:4 Changed 3 years ago by damato
comment:5 Changed 3 years ago by coldhoff
Hello,
The bug is still there in YAM 2.6.
Regards, comment:6 Changed 3 years ago by damato
Can you provide an example email please with a detailed explaination and perhaps screenshots which time is shown and which time you expect to be shown for a certain email. thanks. comment:7 Changed 3 years ago by coldhoff
Attachment (YAM-example) added by ticket reporter. comment:8 Changed 3 years ago by coldhoff
The mail is displayed at the last line in the main window list view of messages.
It was sent during last summer at 9:58 CET and I also reside in this time zone.
The main window displays this as 8:58, which would be correct time if their were
Since I sometimes need to know exactly when I received a message from someone, I
It would be nice if the main window list view of the messages actually displayed comment:9 Changed 4 months ago by damato
After investigation this ticket I think you are perfectly right in complaining that YAM doesn't display the actual time corrected to your timezone that was effective at the time the mail has been sent. As it stands let me summarize the problem as followed:
But to actually fix the problem there arises the problem that yam have to be able to actually know which timezone (CEST vs CET) was affective at a certain date in the past. Thus, we have to have a function to which you supply a date and it will output that at that date it was either +0100 (CET) or +0200 (CEST). Another problem is that daylight saving times tend to change in the future (politically driven) which requires not have something hardcoded by to use a kind of functionality to even correctly query in the future at which date daylight saving was in effect or not (just in case a country changes their rules).
Nevertheless, I count this issue a highly important thing as the current situation is really incorrect and just confuses users as it is correctly outlined by the authors of this ticket. Thus, I will assign it to the next release and give it some priority instead of just for a future release. So lets discuss how we can correctly fix the issue. comment:10 Changed 4 months ago by damato
After some more investigation and search on the net I found the following potential solution to find out if a certain date was in DST or non-DST: #include <time.h>
#include <stdio.h>
enum DST { DST_OFF, DST_ON, DST_OFFTOON, DST_ONTOOFF };
enum DST getdstinfo(int year, int month, int day) {
struct tm a = {};
struct tm b;
a.tm_isdst = -1;
a.tm_mday = day;
a.tm_mon = month - 1;
a.tm_year = year - 1900;
b = a;
a.tm_hour = 23;
a.tm_min = 59;
mktime(&a);
mktime(&b);
if (a.tm_isdst && b.tm_isdst) return DST_ON;
else if (!a.tm_isdst && !b.tm_isdst) return DST_OFF;
else if (a.tm_isdst && !b.tm_isdst) return DST_OFFTOON;
else return DST_ONTOOFF;
}
void main(void)
{
printf("DST1: %d\n", getdstinfo(2012, 3, 24)); // should return 0
printf("DST2: %d\n", getdstinfo(2012, 3, 25)); // should return 2
printf("DST3: %d\n", getdstinfo(2012, 3, 26)); // should return 1
printf("DST4: %d\n", getdstinfo(2012, 5, 22)); // should return 1
}
However, unfortunatly at least unter OS4 it always returns "1", on MorphOS it always returns "0" while on linux it correctly returns the sequence 0,2,1,1. So I guess OS4 and MOS and also probably OS3 don't have the proper functionality to identify if a certain time_t is/was in dst or not.
So we still have to search for a potential solution to identify if a certain date was in dst or not. Thore? do you know any solution? comment:11 Changed 3 months ago by damato
(In [6619]) * extrasrc/tzcode: added sources of zoneinfo sources for common functions
comment:12 Changed 3 months ago by damatocomment:13 Changed 3 months ago by damato
(In [6621]) * resources/zoneinfo, tools/tzdata: added raw source files of the tzdata2013a
Note: See
TracTickets for help on using
tickets. | This list contains all users that will be notified about changes made to this ticket. These roles will be notified: Reporter, Owner, Subscriber
| ||||||||||||||||||||||||||||



Is this bug still valid with YAM 2.6? Please report back so that we can investigate and fix it for 2.7.