Scala UTC timestamp in seconds since January 1st, 1970
ScalaTimestampUtcScala Problem Overview
How do I get the Scala UTC timestamp in seconds since January 1st, 1970?
Scala Solutions
Solution 1 - Scala
Same way as you would in Java:
val timestamp: Long = System.currentTimeMillis / 1000
Solution 2 - Scala
As of Java 8 it's possible to do so like so:
import java.time.Instant
unixTimestamp : Long = Instant.now.getEpochSecond
Via micha's answer here: https://stackoverflow.com/a/24703573/577199