When messages are %RESCANed hpt doesn't use the __ftsc_date field from
the Squish message base, but the 2-second precision DOS date. Which
means some messages (~50%) are exported with the time one second off.
Some tosser's dupe checkers might fail ...
When messages are %RESCANed hpt doesn't use the __ftsc_date field
from the Squish message base, but the 2-second precision DOS date.
Which means some messages (~50%) are exported with the time one
second off.
I've never seen uneven timestamps in my editor. Hell, at the moment of writing i see 12:43:49 in the header on the from/to lines. But after saving the mail it switched to 12:43:48, lucky me. ;-)
As far as i remember squish does have a 2 seconds resolution. But i don't know why. If i do not see further than my nose i would say 2 second resolution is the standard and if you have uneven timestamps in your msgbase than that is the bug.
Some tosser's dupe checkers might fail ...
Is this speculation/theory or could you name a real issue?
say 2 second resolution is the standard and if you have uneven
timestamps in your msgbase than that is the bug.
The DOS time format uses a 2 seconds resolution. The creation and
received date is stored has DOS time in the Squish message base.
Some tosser's dupe checkers might fail ...
Is this speculation/theory or could you name a real issue?
This is what other nodes have reported and I have no reason to doubt
it. Don't you think there are tossers out there which believe that
messages with different time stamps are not the same?
doesn't matter, because per Squish specification the __ftsc_date
should be used on export (rescan). What would be the benefit of not
using the exact time when it's available?
Hello Oli!
01 Feb 21, Oli wrote to Kai Richter:
say 2 second resolution is the standard and if you have uneven
timestamps in your msgbase than that is the bug.
The DOS time format uses a 2 seconds resolution. The creation and
received date is stored has DOS time in the Squish message base.
After export the pkt message does no longer have creation date? As for FTS-0001 it's the last edited date?
Some tosser's dupe checkers might fail ...
Isn't the MSGID the solution for that problem?
Is this speculation/theory or could you name a real issue?
This is what other nodes have reported and I have no reason to doubt
it. Don't you think there are tossers out there which believe that
messages with different time stamps are not the same?
I don't know (out there). I think because of ASCII DateTime would not effect DOS 16-bit file format date stamps it should be ok to see
different time stamps as different mails.
I don't doubt that the problem exist but for fault confirmation and trouble shooting it is easier to know the software in use.
doesn't matter, because per Squish specification the __ftsc_date
I will forward you my messy research for the format. In short: For FTS-0001 DateTime is the creation date of the message. A packed message use the last edited date. For type 2 pkt format it's the pkt creation date.
After reading those specs i would recomment msgid for dupe checking. ;-)
should be used on export (rescan). What would be the benefit of not
using the exact time when it's available?
Same like if using: Nothing? Even with a fix available - every hpt system have to use that fix to get rid of the problem. And i think we both know that that is most unlikely to happen.
The XMSG structure has the following format:
I don't doubt that the problem exist but for fault confirmation
and trouble shooting it is easier to know the software in use.
hpt does it wrong. I tested it. What else is there to trouble shoot?
It's just a simple bug ...
It only affects systems that use a Squish database and have downlinks
that do a %RESCAN.
It's just a simple bug ...
If it is it would be fixed already.
You reported this one a year ago, don't you?
It's just a simple bug ...
If it is it would be fixed already.
You reported this one a year ago, don't you?
I don't know why it doesn't get fixed. Maybe nobody wants to touch that part of the code anymore. A project where critical bugs doesn't get
fixed anymore is kind of abandoned.
I suspect the patch below fixes this, but I've not tested it.
It's also necessary to verify it doesn't break when rescanning *.MSG and JAM bases.
- sc_time((union stamp_combo *)&(xmsg.date_written), (char *)msg->datetime);
+ strcpy((char *)msg->datetime, (char *) xmsg.__ftsc_date);
It's just a simple bug ...
If it is it would be fixed already.
You reported this one a year ago, don't you?
I don't know why it doesn't get fixed. Maybe nobody wants to touch
that part of the code anymore. A project where critical bugs doesn't
get fixed anymore is kind of abandoned.
I suspect the patch below fixes this, but I've not tested it.
It's also necessary to verify it doesn't break when rescanning
*.MSG and JAM bases.
- sc_time((union stamp_combo *)&(xmsg.date_written), (char
*)msg->datetime); + strcpy((char *)msg->datetime, (char *)
xmsg.__ftsc_date);
What happens if xmsg.__ftsc_date is empty? Local messages don't have an __ftsc_date and it could also be missing for other reasons (messages converted from another message base format, copied/moved in a message editor or tossed by a tosser that doesn't copy the __ftsc_date).
10 Feb 21 11:04, you wrote to me:
What happens if xmsg.__ftsc_date is empty? Local messages don't
have an __ftsc_date and it could also be missing for other reasons
(messages converted from another message base format, copied/moved
in a message editor or tossed by a tosser that doesn't copy the
__ftsc_date).
Good point. But it's easy to test for that condition.
if (*xmsg.__ftsc_date == '\0')
{
/* __ftsc_date is empty, so use xmsg.date_written */
sc_time( ...
}
else
{
/* use xmsg.__ftsc_date */
strcpy( ...
}
Date and time : 10 Feb 21 14:58:42
Last one is a message with an empty __ftsc_date field.
(I had to use an hex editor, because Golded does write the __ftsc_date
for messages created in the editor, even the Squish developer
documentation strongly advises against it).
10 Feb 21 09:56, you wrote to Kai Richter:
It's just a simple bug ...
I suspect the patch below fixes this, but I've not tested it.
It's also necessary to verify it doesn't break when rescanning *.MSG and JAM bases.
I don't know why it doesn't get fixed. Maybe nobody wants to touch
that part of the code anymore. A project where critical bugs doesn't
get fixed anymore is kind of abandoned.
So, where is a pull request from you? I don't see it.
As to me, I have a different view on what is critical and what is not so critical. I have a long list of what should be done in Husky and I pick the items from the list according to my idea of which item is more important to me. I may also pick a somewhat less important item if it requires a little time. And I have my life besides Fidonet, particularly
I still have a job despite the fact that I am 73 y/o. So I cannot work
for Fidonet full time, but only when I have some time for it.
I tested it with a JAM base and it still works. But it turned out a
rescan from a JAM base also modifies time stamps:
Original:
Date and time : 09 Feb 21 06:31:33
After rescan from JAM:
Date and time : 09 Feb 21 06:31:32
Which means Squish can be fixed, but JAM has the same problem (I tested JAM with hpt from github master without any patch).
Maybe a problem/bug within SMAPI (JAM jammed into the Squish API)?
14 Feb 21 11:28, you wrote to me:*)(msg->> __ftsc_date));
I tested it with a JAM base and it still works. But it turned out a
rescan from a JAM base also modifies time stamps:
Original:
Date and time : 09 Feb 21 06:31:33
After rescan from JAM:
Date and time : 09 Feb 21 06:31:32
Which means Squish can be fixed, but JAM has the same problem (I
tested JAM with hpt from github master without any patch).
Maybe a problem/bug within SMAPI (JAM jammed into the Squish API)?
api_jam.c:JamReadMsg() has this:
scombo = (SCOMBO *)(&(msg->date_written));
scombo = TmDate_to_DosDate(s_time, scombo);
/* ftsdate = msg->__ftsc_date; */
ftsdate = (unsigned char *)sc_time(scombo, (char
But maybe the correct code should be:
if (*msg->__ftsc_date)
{
ftsdate = msg->__ftsc_date;
}
else
{
scombo = (SCOMBO *)(&(msg->date_written));
scombo = TmDate_to_DosDate(s_time, scombo);
ftsdate = (unsigned char *)sc_time(scombo, (char *)(msg->__ftsc_date)); }
api_jam.c:JamReadMsg() has this:
scombo = (SCOMBO *)(&(msg->date_written));
scombo = TmDate_to_DosDate(s_time, scombo);
/* ftsdate = msg->__ftsc_date; */
ftsdate = (unsigned char *)sc_time(scombo, (char *)(msg->__ftsc_date));
But maybe the correct code should be:
if (*msg->__ftsc_date)
{
ftsdate = msg->__ftsc_date;
}
else
{
scombo = (SCOMBO *)(&(msg->date_written));
scombo = TmDate_to_DosDate(s_time, scombo);
ftsdate = (unsigned char *)sc_time(scombo, (char *)(msg->__ftsc_date));
}
But maybe the correct code should be:
if (*msg->__ftsc_date)
{
ftsdate = msg->__ftsc_date;
}
else
{
scombo = (SCOMBO *)(&(msg->date_written));
scombo = TmDate_to_DosDate(s_time, scombo);
ftsdate = (unsigned char *)sc_time(scombo, (char
*)(msg->__ftsc_date)); }
Mhh, a JAM message base doesn't have an __ftsc_date field, I don't understand this piece of the code.
dosdate->msg_st.time.mm = tmdate->tm_min;
dosdate->msg_st.time.ss = tmdate->tm_sec >> 1;
^^^^^^^^^^^^
}
return dosdate;
}
AFAIK the JAM format doesn't use DOS Time at all. It seems to be an unnecessary lossy conversion.
"ftsdate" variable is assigned but it is never used, so I've already commented it out but not in master branch yet.
Scott's idea of using his lossy timestamps to recreate XMSG->__ftsc_date is nonsense and as you know only has a 50/50 chance of working accurately.
Now, the Squish format stupidly uses those lossy timestamps but there's
no reason the whole API has to. Conceivably that could be fixed with a
bit of work so as not to corrupt Squish bases.
In the mean time JAM's msgh->Hdr.DateWritten is a 32-bit unsigned
integer. (Fortunately being unsigned it will wrap around in 2106, not in 2038.)
The JAM spec says:
"An ulong representing the number of seconds since midnight, January 1, 1970."
Presumably that's 1970-01-01 00:00 UTC, not local time.
That value is then fed into mktime() to return the number of seconds
since 1970-01-01, then a timezone offset is added with gettz().
But why is gettz() called every time JamWriteMsg() is called? Wouldn't that mean HPT adds the local timezone to the DateWritten field every time it tosses a message to a JAM base? That's a bug, isn't it? Unless I'm reading the code wrong.[...]
api_jam.c also hints at supporting the TZUTC kludge, but it does nothing to calculate dates with it. It just stores it as a JAM subfield because the spec says it can.
Scott's idea of using his lossy timestamps to recreate
XMSG->__ftsc_date is nonsense and as you know only has a 50/50
chance of working accurately.
I didn't think he expected it to work accurately, more like it is not relevant to preserve the exact time and 2 second resolution is good enough. The dupe checker in Squish also uses a 2 second granularity.
Now, the Squish format stupidly uses those lossy timestamps but
there's no reason the whole API has to. Conceivably that could be
fixed with a bit of work so as not to corrupt Squish bases.
Not sure if I understand. What kind of potential corruption do you have
in mind?
In the mean time JAM's msgh->Hdr.DateWritten is a 32-bit unsigned
integer. (Fortunately being unsigned it will wrap around in 2106,
not in 2038.)
The JAM spec says:
"An ulong representing the number of seconds since midnight,
January 1, 1970."
Presumably that's 1970-01-01 00:00 UTC, not local time.
I don't think it's meant to be UTC. From the JAM spec:
(1) All timestamps created locally (i.e. those not imported from
other systems) are stored in local time.
The DateWritten field is also used for imported messages. Why should the time ever be converted to UTC? Wouldn't that make everything more complicated? UNIX time in JAM is not a real Unix timestamp, more UNIX-style (UNIXish).
It's been so long since I used the original SquishMail (ie. squish.exe) that I don't recall if rescans were a supported feature.
("squish.exe rescan 3:633/267 fidosoft.husky" maybe?)
[...]The JAM spec says:
"An ulong representing the number of seconds since midnight,
January 1, 1970."
Presumably that's 1970-01-01 00:00 UTC, not local time.
I don't think it's meant to be UTC. From the JAM spec:
You could be right, but at the very least it's ambiguous since AFAIK the convention is for time_t on Linux/BSD be stored as UTC.
But it's necessary to work accurately if you're doing a rescan.
That's the whole point of this bug
The bug is that the normal scan and the rescan created different
DateTime.
I don't understand what you are doing but it looks like you do some re-invention. Isn't it easier to look how the scan.c does the export and use the same code for the rescan?
Isn't it easier to look how the scan.c does the export and use the
same code for the rescan?
To summarise:
"toss" shouldn't need the message base, instead just memcpy()ing the ftscdate field between .PKTs. This is how PassThru areas work but
should also be true for non-PassThru.
Isn't it easier to look how the scan.c does the export and use the
same code for the rescan?
To summarise:
"toss" shouldn't need the message base, instead just memcpy()ing
the ftscdate field between .PKTs. This is how PassThru areas work
but should also be true for non-PassThru.
Thanks, i hadn't that in my mind. I thought htp toss would toss into the messagebase only. To be honest i never paid attention at which run the downlink packages were build. Oh wait, are you talking about toss.c the code but not the function hpt toss?
Sysop: | Rempala |
---|---|
Location: | Richlands, NC |
Users: | 106 |
Nodes: | 10 (0 / 10) |
Uptime: | 39:59:11 |
Calls: | 205 |
Files: | 6 |
Messages: | 111,121 |