79539274

Date: 2025-03-27 15:10:45
Score: 0.5
Natty:
Report link

Even though there's already an accepted answer, I thought this one was good to share.

const timeInSeconds = new Date.getTime() / 1000 | 0;

This works because bitwise operations on floats converts them to 32 bit integers; thus, truncating the decimal part.

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Jimmy van Beele