Make GoldED+ behave well with DST. Change in CfgFormat patch.

This commit is contained in:
Jacobo Tarrío 2000-10-06 22:04:07 +00:00
parent 7dc91eb0f2
commit 324ac58736
8 changed files with 33 additions and 12 deletions

View File

@ -6,12 +6,12 @@ all: $(TARGET)
include $(TOP)/GNUmakef.def include $(TOP)/GNUmakef.def
# Config files formats
include $(TOP)/Config.def
# Messagebase formats # Messagebase formats
include $(TOP)/MSGBase.def include $(TOP)/MSGBase.def
# Config files formats
include $(TOP)/Config.def
FOBJPATH=$(TOP)/$(OBJPATH)/$(PLATFORM)/$(TARGET) FOBJPATH=$(TOP)/$(OBJPATH)/$(PLATFORM)/$(TARGET)
FLIBPATH=$(TOP)/$(LIBPATH)/$(PLATFORM) FLIBPATH=$(TOP)/$(LIBPATH)/$(PLATFORM)
FDEPPATH=$(TOP)/$(DEPPATH)/$(PLATFORM) FDEPPATH=$(TOP)/$(DEPPATH)/$(PLATFORM)

View File

@ -15,6 +15,9 @@ ______________________________________________________________________
- Fixed Bug #109368: Ged+ crashes if there are more than 30 links in - Fixed Bug #109368: Ged+ crashes if there are more than 30 links in
the help. Now accepts up to 50, and ignores more. the help. Now accepts up to 50, and ignores more.
- Fixed bug that made GoldED+ not behave well with daylight savings
time (it showed an hour less).
______________________________________________________________________ ______________________________________________________________________
Notes for GoldED+ 1.1.4.6, August 7 2000 Notes for GoldED+ 1.1.4.6, August 7 2000

View File

@ -744,7 +744,9 @@ void KludgeDATE(GMsg* msg, const char* ptr) {
t.tm_sec = second; t.tm_sec = second;
t.tm_isdst = -1; t.tm_isdst = -1;
time_t a = mktime(&t); time_t a = mktime(&t);
time_t b = mktime(gmtime(&a)); struct tm *tp = gmtime(&a);
tp->tm_isdst = -1;
time_t b = mktime(tp);
msg->written = a + a - b; msg->written = a + a - b;
} }
} }

View File

@ -223,7 +223,9 @@ static void MakeMsg3(int& mode, GMsg* msg) {
// Do Timefields // Do Timefields
if(msg->attr.fmu()) { if(msg->attr.fmu()) {
time_t a = time(NULL); time_t a = time(NULL);
time_t b = mktime(gmtime(&a)); struct tm *tp = gmtime(&a);
tp->tm_isdst = -1;
time_t b = mktime(tp);
a += a - b; a += a - b;
if(AA->isjam() or AA->iswildcat()) if(AA->isjam() or AA->iswildcat())
msg->received = a; msg->received = a;
@ -792,7 +794,9 @@ void MakeMsg(int mode, GMsg* omsg) {
} }
if(dochgdate) { if(dochgdate) {
time_t a = time(NULL); time_t a = time(NULL);
time_t b = mktime(gmtime(&a)); struct tm *tp = gmtime(&a);
tp->tm_isdst = -1;
time_t b = mktime(tp);
a += a - b; a += a - b;
msg->received = msg->arrived = msg->written = a; msg->received = msg->arrived = msg->written = a;
} }

View File

@ -209,10 +209,14 @@ int ImportQWK() {
_tm.tm_sec = 0; _tm.tm_sec = 0;
_tm.tm_isdst = -1; _tm.tm_isdst = -1;
time_t a = mktime(&_tm); time_t a = mktime(&_tm);
time_t b = mktime(gmtime(&a)); struct tm *tp = gmtime(&a);
tp->tm_isdst = -1;
time_t b = mktime(tp);
msg->written = a + a - b; msg->written = a + a - b;
a = time(NULL); a = time(NULL);
b = mktime(gmtime(&a)); tp = gmtime(&a);
tp->tm_isdst = -1;
b = mktime(tp);
msg->arrived = a + a - b; msg->arrived = a + a - b;
// Read message text // Read message text

View File

@ -908,7 +908,9 @@ int LoadMessage(GMsg* msg, int margin) {
reader_rcv_noise = 1; reader_rcv_noise = 1;
if(not msg->attr.rcv()) { // Have we seen it? if(not msg->attr.rcv()) { // Have we seen it?
time_t a = time(NULL); time_t a = time(NULL);
time_t b = mktime(gmtime(&a)); struct tm *tp = gmtime(&a);
tp->tm_isdst = -1;
time_t b = mktime(tp);
msg->received = a + a - b; // Get current date msg->received = a + a - b; // Get current date
msg->attr.rcv1(); // Mark as received msg->attr.rcv1(); // Mark as received
reader_rcv_noise++; reader_rcv_noise++;

View File

@ -168,7 +168,9 @@ void ProcessSoupMsg(char* lbuf, GMsg* msg, int& msgs, char* areaname, int tossto
msg->orig = msg->oorig = CFG->internetgate.addr.net ? CFG->internetgate.addr : AA->aka(); msg->orig = msg->oorig = CFG->internetgate.addr.net ? CFG->internetgate.addr : AA->aka();
msg->dest = msg->odest = AA->aka(); msg->dest = msg->odest = AA->aka();
time_t a = time(NULL); time_t a = time(NULL);
time_t b = mktime(gmtime(&a)); struct tm *tp = gmtime(&a);
tp->tm_isdst = -1;
time_t b = mktime(tp);
msg->arrived = a + a - b; msg->arrived = a + a - b;
Line* line = NULL; Line* line = NULL;
@ -690,7 +692,9 @@ int ExportSoupMsg(GMsg* msg, char* msgfile, gfile& fp, int ismail) {
msg->attr.scn1(); msg->attr.scn1();
msg->attr.uns0(); msg->attr.uns0();
time_t a = time(NULL); time_t a = time(NULL);
time_t b = mktime(gmtime(&a)); struct tm *tp = gmtime(&a);
tp->tm_isdst = -1;
time_t b = mktime(tp);
msg->arrived = a + a - b; msg->arrived = a + a - b;
AA->SaveHdr(GMSG_UPDATE, msg); AA->SaveHdr(GMSG_UPDATE, msg);
if(msg->attr.k_s()) if(msg->attr.k_s())

View File

@ -442,7 +442,9 @@ void guserbase::write_entry(uint idx, bool updateit) {
if(updateit and not entry.is_deleted) { if(updateit and not entry.is_deleted) {
time_t a = time(NULL); time_t a = time(NULL);
time_t b = mktime(gmtime(&a)); struct tm *tp = gmtime(&a);
tp->tm_isdst = -1;
time_t b = mktime(tp);
entry.lastdate = a + a - b; entry.lastdate = a + a - b;
if(not entry.firstdate) if(not entry.firstdate)
entry.firstdate = entry.lastdate; entry.firstdate = entry.lastdate;