UTCDateTime() 函数
- Last UpdatedFeb 05, 2018
- 1 minute read
返回 UTC 时间、UTC 日期与时间,或本地时区。
语法
result = UTCDateTime (format)
参数
format
确定返回的内容。字符串值、消息标记名,或带以下可能值的字符串表达式:
UTC_SHORT - 函数返回 UTC 时间
UTC_LONG - 函数返回 UTC 日期与时间
UTC_LOCAL - 函数返回本地操作系统时区设置中所设置的时区的名称
任何其它值返回缺省格式的 UTC 日期与时间 (ddd mm dd hh:mm:ss yyyy)。
示例
在太平洋时区 2003 年 1 月 6 号星期一上午 09:24,UTCDateTime() 函数返回以下内容。
此脚本返回 17:24:05
UTCDateTime("UTC_SHORT")
此脚本返回 01/06/2003 17:24:05
UTCDateTime("UTC_LONG")
此脚本返回 Pacific Standard Time -8:0:1
UTCDateTime("UTC_LOCAL")
此脚本返回 Mon Jan 06 17:24:05 2003。
UTCDateTime("Invalid")