Skip to content

Instantly share code, notes, and snippets.

@victorvaz
Created October 30, 2015 02:37
Show Gist options
  • Save victorvaz/05849c587e620d624a61 to your computer and use it in GitHub Desktop.
Save victorvaz/05849c587e620d624a61 to your computer and use it in GitHub Desktop.
/**
* Mostrar a UNIX Time atual
*/
public class UnixTime
{
public static void main(String[] args)
{
// Pegamos o tempo em milisegundos e dividimos por 1000 para pegar os segundos:
long unixTime = System.currentTimeMillis() / 1000;
System.out.println(unixTime);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment