storj/web/satellite/src/utils/time.ts
NickolaiYurchenko 1c1e62be09 web/satellite: comments update
Change-Id: If5779cf8d80cf9fac7180498ce748f427df57e0a
2020-02-14 18:54:31 +02:00

11 lines
257 B
TypeScript

// Copyright (C) 2019 Storj Labs, Inc.
// See LICENSE for copying information.
/**
* toUnixTimestamp converts Date to unix timestamp.
* @param time
*/
export function toUnixTimestamp(time: Date): number {
return Math.floor(time.getTime() / 1000);
}