Commit for timezone mention in kernal

This commit is contained in:
shunmugam 2020-01-07 17:58:19 +05:30
parent 61f2454f0b
commit ada0d5ba8a
3 changed files with 38 additions and 7 deletions

View File

@ -651,8 +651,14 @@ export class BlockchainKernelController {
.utc()
.format('YYYY-MM-DD');
var timeIntervalQry =
'timestamp BETWEEN SYMMETRIC ' + fromdate + ' AND ' + todate;
var timeIntervalQry =
"timestamp at time zone '" +
process.env.TIME_ZONE +
"' BETWEEN SYMMETRIC '" +
fromdate +
"' AND '" +
todate +
"'";
} else {
var timeIntervalQry = "timestamp > current_date - interval '30 days'";
}
@ -841,11 +847,21 @@ LEFT JOIN (select block_id, count(block_id) as block_id_count from blockchain_ou
TransactionFeeRequestData.FromDate ||
TransactionFeeRequestData.ToDate
) {
var timeIntervalQry =
'blockchain_block.timestamp BETWEEN SYMMETRIC ' +
// var timeIntervalQry =
// 'blockchain_block.timestamp BETWEEN SYMMETRIC ' +
// TransactionFeeRequestData.FromDate +
// ' AND ' +
// TransactionFeeRequestData.ToDate;
var timeIntervalQry =
"blockchain_block.timestamp at time zone '" +
process.env.TIME_ZONE +
"' BETWEEN SYMMETRIC '" +
TransactionFeeRequestData.FromDate +
' AND ' +
TransactionFeeRequestData.ToDate;
"' AND '" +
TransactionFeeRequestData.ToDate +
"'";
var seriesquery =
"'" +
TransactionFeeRequestData.FromDate +

View File

@ -659,6 +659,12 @@
<a href="JavaScript:void(0);" (click)="
Transactionlinechartreq('', '', '3 months'); selectedItem8 = 5
" id="5" #item5 [ngClass]="{ active: selectedItem8 == item5.id, day3m_txt: true }">3 {{'home.MONTHS' | translate}}</a>
<a href="JavaScript:void(0);" (click)="
Transactionlinechartreq('', '', 'all'); selectedItem8 = 8;
" id="8" #item8 [ngClass]="{ active: selectedItem8 == item8.id, day3m_txt: true }">{{'home.All' | translate}}</a>
</div>
<div class="explore_all text-right">
<a routerLink="/chart/transactions-by-date"><span class="text-uppercase d-block">{{'home.EXPLORE_IT' | translate}} <i

View File

@ -222,9 +222,18 @@ export class GraphListComponent implements OnInit {
Transactionlinechartreq(fromDate = '', ToDate = '', interval = '') {
return new Promise((resolve, reject) => {
let params = new HttpParams();
this.feeGraphData = []
if(interval == "all") {
// this.Type=""
fromDate = "2019-09-03 00:00:00"
ToDate = moment(new Date()).format("YYYY-MM-DD 23:29:59")
}
params = params.append('Interval', (interval == "all")?"":interval);
params = params.append('FromDate', fromDate);
params = params.append('ToDate', ToDate);
params = params.append('Interval', interval);
// params = params.append('Interval', interval);
this.chartService
.apiGetRequest(params, '/blockchain_kernel/transactionlinechart')
.subscribe(