Answers for "Convert date to seconds"

0

Convert date to seconds

/// the current time, in “seconds since the epoch”
static int currentTimeInSeconds() {
    var ms = (new DateTime.now()).millisecondsSinceEpoch;
    return (ms / 1000).round();
}
Posted by: Guest on June-18-2021

Code answers related to "Convert date to seconds"

Browse Popular Code Answers by Language