UTC 
public static long UTC(int year,
                       int month,
                       int date,
                       int hrs,
                       int min,
                       int sec)
Determines the date and time based on the arguments. The arguments are interpreted as a year, month, day of the month, hour of the day, minute within the hour, and second within the minute, exactly as for the Date constructor with six arguments, except that the arguments are interpreted relative to UTC rather than to the local time zone. The time indecated is returned represented as the distance, measured in milliseconds, of that time from the epoch (00:00:00 GMT on January 1, 1970).

解决方案 »

  1.   

    public static long UTC(int year,int month,int date,int hrs,int min,int sec)
      

  2.   

    UTC(int year, int month, int date, int hrs, int min, int sec)
    如果你使用java1.1以上版本,它被建议不要使用,替代使用Calendar.set(),或者GregorianCalendar
      

  3.   

    Deprecated. As of JDK version 1.1, replaced by Calendar.set(year + 1900, month, date, hrs, min, sec) or GregorianCalendar(year + 1900, month, date, hrs, min, sec), using a UTC TimeZone, followed by Calendar.getTime().getTime(). 
    我觉得还是用getTime()好一些。