LOTW download date

10 posts / 0 new
Last post
4X6GP
LOTW download date

When you download QSLs from the LOTW site, you need to enter the date from which QSLs will be downloaded. In order to minimize the amount of data downloaded, this date should update automatically when you download. But now you have to remember when you last downloaded, or leave the date unchanged and download a larger file than necessary.

I could probably fix this myself, but I haven't been able to find the module that does the "download QSLs from LOTW website" function. Can someone tell me which it is?

oh1kh
LOTW download date

HI!
Is it a date from which qsos are done, or date from which LoTW confirmations have arrived to LoTW?
If it is the first the you have to make larger download at least few times a year to get all confirmations.
Everyone do not upload confirmation right after qso.
(I am just too lazy to check date meaning now. I normally use 20300101 as start day during this year.)

WIth Lazarus-ide open LoTW download form designer. Check the column (TEdit) name that holds the date and dig it out from corresponding *.pas file.
I use very often command terminal and grep to find a variable, procedure or function usage:
At root folder:
grep -ni variablename src/*.pas

Returns file(s) and line numbers where "variablename" exisits

In case you do not succeed to find: fImportLotwWeb.pas / edtDateFrom

--
Saku
OH1KH

4X6GP
LOTW download date

Sorry, I didn't see your answer before for some reason.
It is the date that the confirmations arrive.
It wouldn't make sense for them to ask for the QSO date, because then you would always have to run the download from the day you started operating in order to make sure you don't miss something!
This way there is overlap of only one day.

Victor, 4X6GP

Victor 4X6GP

4X6GP
LOTW download date -- solved

The relevant module is fImportLoTWWeb. I added one line to write the current date back to the ini file after a successful import. It is in procedure TfrmImportLoTWWeb.btnDownloadClick and here is a snippet showing the line I added (boldfaced):

with TfrmImportProgress.Create(self) do
try
FileName := AdifFile;
ImportType := imptImportLoTWAdif;
LoTWShowNew := chkShowNew.Checked;
ShowModal;
QSOList.Text := LoTWQSOList.Text;
Count := LoTWQSOList.Count
finally
Free
end;
mStat.Lines.Add('Import complete ...');
cqrini.WriteString('LoTWImp','DateFrom',FormatDateTime('YYYY-MM-DD', Now)); //4X6GP

if chkShowNew.Checked then
begin
mStat.Lines.Add('');
mStat.Lines.Add('New QSOs confirmed by LoTW:');
mStat.Lines.AddStrings(QSOList);
mStat.Lines.Add('-----------------------------');
mStat.Lines.Add('Total: ' + IntToStr(Count) + ' new QSOs');
end;

Victor 4X6GP

oh1kh
LOTW download date

HI Victor!

 

OK!
I was just thinking should the date be current date minus one day to be sure?

 

--
Saku
OH1KH

4X6GP
LOTW download date

The LOTW documentation says that the query will return all QSLs received "on or after" the specified date. So you won't miss anything.
https://lotw.arrl.org/lotw-help/developer-query-qsos-qsls/

Victor 4X6GP

4X6GP
LOTW download date

Saku,
On thinking about it, I think you are right. The server understands the date according to its timezone. So if the server is in the eastern USA, there will be a period of 10 hours during which it thinks the date is D and I think it is D+1. A QSL that comes in during this period could be missed. Perhaps the server uses UTC, but that is still a problem for me and everyone to the east of the UK!
I will modify my code to move the date back one day.

Victor 4X6GP

oh1kh
LOTW download date

Hi Victor!
That was just what I was thinking.
We should use UTC for everything, but who guarantees that with web services.

That is why I thought that it would be safe to set date one day behind. Anyway it is not doing any noticeable harm.
I think I fix that also into my source.

How ever I still recommend doing larger download once or twice a year, just in case.

--
Saku
OH1KH

4X6GP
LOTW download date

I did this instead of the previous code:
cqrini.WriteString('LoTWImp','DateFrom',FormatDateTime('YYYY-MM-DD', IncDay(Today, -1))); //4X6GP
And I had to add the DateUtils unit.

Victor

Victor 4X6GP

F5JQF
LOTW download date

Hello everyone,
I compiled the latest alpha version 2.6.0 (116) GtK2 and everything is ok.
Thank you for this new added function regarding LOTW.

73 Yves / F5JQF

Yves, F5JQF
CQRlog Ver.Alpha_(xxx) / Hamlib 4.5.5 / Linux Mint 21.3 Cinnamon
..