Example usage for java.util Calendar getInstance

List of usage examples for java.util Calendar getInstance

Introduction

In this page you can find the example usage for java.util Calendar getInstance.

Prototype

public static Calendar getInstance(Locale aLocale) 

Source Link

Document

Gets a calendar using the default time zone and specified locale.

Usage

From source file:Main.java

public static Long generateTimeStamp() {
    Calendar calendar = Calendar.getInstance(TimeZone.getTimeZone("UTC"));
    return calendar.getTimeInMillis() / 1000L;
}