Javascript
export function getEpoch(): number {
return Math.floor(new Date().getTime() / 1000.0);
}
Postgres
select (FLOOR(EXTRACT(epoch FROM NOW()))::int)
Helpful?
If you think this is helpful 🎈
Don't keep it to yourself 🙊
Share it with your lovely followers at twitter 🗽