Skip to content

Commit 5972a75

Browse files
authored
Merge pull request #72 from fwiessner/patch-1
fix utils.calculateUnixTime()
2 parents 752e066 + 4ecfbee commit 5972a75

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

src/utils/index.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -176,9 +176,7 @@ const formatMultiCoins = (amounts: string[], denoms: string[]) => {
176176
*/
177177

178178
const calculateUnixTime = (seconds = 86400) => {
179-
var myDate = new Date(2021, 6, 20, 14, 30, 15);
180-
myDate.setSeconds(myDate.getSeconds() + seconds);
181-
return String(Math.floor(new Date(myDate).getTime() / 1000));
179+
return String(Math.floor(Date.now() / 1000) + seconds);
182180
};
183181

184182
export const utils = {

0 commit comments

Comments
 (0)