語言

Date.UTC(Int32, Int32, Int32, Int32, Int32, Int32) 方法

定義

警告

deprecated

根據論點決定日期和時間。

[Android.Runtime.Register("UTC", "(IIIIII)J", "")]
[System.Obsolete("deprecated")]
public static long UTC(int year, int month, int date, int hrs, int min, int sec);
[<Android.Runtime.Register("UTC", "(IIIIII)J", "")>]
[<System.Obsolete("deprecated")>]
static member UTC : int * int * int * int * int * int -> int64

參數

year
Int32

年份為 1900 年。

month
Int32

0到11之間的那個月。

date
Int32

月份的星期幾介於1點到31號之間。

hrs
Int32

從0點到23點的時間。

min
Int32

0到59分鐘之間的時間。

sec
Int32

0到59秒之間的秒數。

傳回

自1970年1月1日00:00:00 GMT以來,根據參數指定的日期與時間,所剩的毫秒數。

屬性

備註

根據論點決定日期和時間。 這些參數被解釋為年、月、月份、日、時、一小時內的分鐘,以及分鐘中的秒,與 Date 構造子的六個參數完全相同,只是這些參數是以 UTC 而非當地時區來解釋。 所顯示的時間以該時間的距離(以毫秒計)表示,從該紀元(1970年1月1日格林威治標準時間00:00:00)開始計算。

此會員已被棄用。 自 JDK 1.1 版本起,改為 Calendar.set(year + 1900, month, date, hrs, min, sec) 或 GregorianCalendar(year + 1900, month, date, hrs, min, sec),使用 UTC TimeZone,接著 Calendar.getTime().getTime()。

Java 文件 java.util.Date.UTC(int, int, int, int, int, int)。

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於