diff --git a/server/utils/common.ts b/server/utils/common.ts index 7120389..16cd5e4 100644 --- a/server/utils/common.ts +++ b/server/utils/common.ts @@ -324,13 +324,23 @@ async function Details (height) { async function GetBlocktime(height){ if(height){ + // const BlockchainLatestBlockQuery3 = await getConnection(Global.network) + // .query( + // "SELECT coalesce(max(bb.alter), 0) as alter FROM (SELECT EXTRACT(EPOCH FROM (timestamp - LAG(timestamp) OVER (ORDER BY timestamp))) AS alter FROM blockchain_block where height="+height+" OR height="+(height-1)+") as bb", + // ) + // .catch(err_msg => { + // return(err_msg); + // }); + const BlockchainLatestBlockQuery3 = await getConnection(Global.network) .query( - "SELECT coalesce(max(bb.alter), 0) as alter FROM (SELECT EXTRACT(EPOCH FROM (timestamp - LAG(timestamp) OVER (ORDER BY timestamp))) AS alter FROM blockchain_block where height="+height+" OR height="+(height-1)+") as bb", + "SELECT extract(epoch from timestamp at time zone '" +process.env.TIME_ZONE+ "') AS alter FROM blockchain_block where height="+height, ) .catch(err_msg => { return(err_msg); }); + + return BlockchainLatestBlockQuery3; } } diff --git a/src/app/view/home/graph-list/graph-list.component.ts b/src/app/view/home/graph-list/graph-list.component.ts index 798abff..ffd90fc 100644 --- a/src/app/view/home/graph-list/graph-list.component.ts +++ b/src/app/view/home/graph-list/graph-list.component.ts @@ -779,7 +779,7 @@ export class GraphListComponent implements OnInit { }, margin: { l: 50, - r: 50, + r: 10, b: 50, t: 50, }, @@ -820,7 +820,7 @@ export class GraphListComponent implements OnInit { }, margin: { l: 50, - r: 50, + r: 10, b: 50, t: 50, }, @@ -872,7 +872,7 @@ export class GraphListComponent implements OnInit { }, margin: { l: 50, - r: 50, + r: 10, b: 50, t: 50, }, @@ -919,7 +919,7 @@ export class GraphListComponent implements OnInit { }, margin: { l: 50, - r: 50, + r: 10, b: 50, t: 50, }, @@ -969,7 +969,7 @@ export class GraphListComponent implements OnInit { }, margin: { l: 50, - r: 50, + r: 10, b: 50, t: 50, }, @@ -1022,7 +1022,7 @@ export class GraphListComponent implements OnInit { }, margin: { l: 50, - r: 50, + r: 10, b: 50, t: 50, }, @@ -1067,7 +1067,7 @@ export class GraphListComponent implements OnInit { }, margin: { l: 50, - r: 50, + r: 10, b: 50, t: 50, }, @@ -1153,7 +1153,7 @@ export class GraphListComponent implements OnInit { }, margin: { l: 50, - r: 50, + r: 10, b: 50, t: 50, }, @@ -1290,7 +1290,7 @@ export class GraphListComponent implements OnInit { }, margin: { l: 50, - r: 50, + r: 10, b: 50, t: 50, }, @@ -1345,7 +1345,7 @@ export class GraphListComponent implements OnInit { }, margin: { l: 50, - r: 50, + r: 10, b: 50, t: 50, },