Java tutorial
//package com.java2s; import java.util.GregorianCalendar; import java.util.TimeZone; public class Main { private static final TimeZone GMT = TimeZone.getTimeZone("GMT"); public static long currentMonthInMills() { GregorianCalendar gregoriancalendar = new GregorianCalendar(); GregorianCalendar gregoriancalendar1 = new GregorianCalendar(gregoriancalendar.get(1), gregoriancalendar.get(2), 1); gregoriancalendar1.setTimeZone(GMT); return gregoriancalendar1.getTimeInMillis(); } }