kopia lustrzana https://gitlab.com/gridtracker.org/gridtracker
Date.parse behavior to local time instead of UTC
rodzic
74db81d764
commit
56e4d58169
|
@ -701,7 +701,7 @@ function grabLOtWLog(test)
|
|||
|
||||
function grabLoTWQSO()
|
||||
{
|
||||
var dLoTWQSO = Date.parse(g_adifLogSettings.lastFetch.lotw_qso);
|
||||
var dLoTWQSO = Date.parse(dateToISO8601(g_adifLogSettings.lastFetch.lotw_qso, "Z"));
|
||||
var tmpDate = ((new Date().getTime()) - 300);
|
||||
|
||||
if ((g_isGettingLOTW == false) && ((isNaN(dLoTWQSO) == false) && (dLoTWQSO < tmpDate)))
|
||||
|
@ -728,7 +728,7 @@ function grabLoTWQSO()
|
|||
|
||||
function grabLoTWQSL()
|
||||
{
|
||||
var dLoTWQSL = Date.parse(g_adifLogSettings.lastFetch.lotw_qsl);
|
||||
var dLoTWQSL = Date.parse(dateToISO8601(g_adifLogSettings.lastFetch.lotw_qsl, "Z"));
|
||||
var tmpDate = ((new Date().getTime()) - 300);
|
||||
|
||||
if ((g_isGettingLOTW == false) && ((isNaN(dLoTWQSL) == false) && (dLoTWQSL < tmpDate)))
|
||||
|
|
|
@ -911,6 +911,28 @@ function userTimeString(Msec)
|
|||
return dateToString(dateTime);
|
||||
}
|
||||
|
||||
function dateToISO8601(dString, tZone)
|
||||
{
|
||||
var retDate = "";
|
||||
var tZone = (typeof tZone !== "undefined") ? tZone : "Z";
|
||||
var dateParts = dString.match(/(\d{4}-\d{2}-\d{2})(\s+(\d{2}:\d{2}:\d{2}))?/);
|
||||
|
||||
if (dateParts !== null)
|
||||
{
|
||||
retDate = dateParts[1]
|
||||
if ((typeof dateParts[3]) !== "undefined")
|
||||
{
|
||||
retDate += "T" + dateParts[3] + ".000" + tZone;
|
||||
}
|
||||
else
|
||||
{
|
||||
retDate += "T00:00:00.000" + tZone;
|
||||
}
|
||||
}
|
||||
|
||||
return retDate;
|
||||
}
|
||||
|
||||
function getWpx(callsign)
|
||||
{
|
||||
var prefix = null;
|
||||
|
|
Ładowanie…
Reference in New Issue