Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,8 @@ public async Task<bool> ProcessPersonFound(
FirstName = t1TaxInfos.FirstOrDefault()?.FirstName,
LastName = t1TaxInfos.FirstOrDefault()?.LastName,
DateOfBirth = t1TaxInfos.FirstOrDefault()?.DateOfBirth,
Date1 = DateTime.Now,
// Date1 = DateTime.Now,
Date1 = GetPacificTimeNow(), // Temporary code see jira ticket FAMS3-4305
SuppliedBySystem = Constants.JcaSystem,
TaxIncomeInformations = t1TaxInfos
};
Expand All @@ -208,6 +209,21 @@ public async Task<bool> ProcessPersonFound(
return true;
}

// ***** Temporary method, made it private so it is not to be used outside of this class
// time should be stored in UTC and dynamics should be timezone aware when presenting the date/time in the UI
// see jira ticket FAMS3-4305
private static DateTime GetPacificTimeNow()
{
// get UTC date time
DateTime utcNow = DateTime.UtcNow;
// Use IANA ID for Linux containers
TimeZoneInfo pacificZone = TimeZoneInfo.FindSystemTimeZoneById("America/Vancouver");

// Convert UTC to Pacific Time
return TimeZoneInfo.ConvertTimeFromUtc(utcNow, pacificZone);
}


public async Task<SSG_SearchRequest> GetSearchRequest(string fileId, CancellationToken token)
{
return await _searchRequestService.GetSearchRequest(fileId, _cancellationToken);
Expand Down Expand Up @@ -402,7 +418,8 @@ private async Task UploadTaxIncomeInformations(
txin.Description = matchedCode?.Value ?? taxinfo.Description ?? taxinfo.TaxCode.Code;

txin.InformationSource = Constants.JcaSystem;
txin.Date1 = DateTime.Now;
// txin.Date1 = DateTime.Now;
txin.Date1 = GetPacificTimeNow(); // Temporary code see jira ticket FAMS3-4305

var uploadedTxin = await _searchRequestService.CreateTaxIncomeInformation(txin, cancellationToken);
if (uploadedTxin != null)
Expand Down Expand Up @@ -465,7 +482,8 @@ private async Task UploadFinancialOtherIncome(
otherin.Description = finIncome.Description ?? finIncome.TaxCode?.Code;
otherin.TaxYear = finIncome.TaxYear;
otherin.Form = finIncome.Form;
otherin.Date = DateTime.Now;
// otherin.Date = DateTime.Now;
otherin.Date = GetPacificTimeNow(); // Temporary code see jira ticket FAMS3-4305
otherin.InformationSource = Constants.JcaSystem;

var uploadedOtherin = await _searchRequestService.CreateFinancialOtherIncome(otherin, cancellationToken);
Expand Down
Loading