JavaScript getUTCHours () method
Examples
According to Universal Time (UTC) Returns the time in hours:
var n = d.getUTCHours();
n output:
try it"
Definition and Usage
getUTCHours () method according to Universal Time (UTC) Returns the hour of time.
Coordinated Universal Time (UTC) in seconds when the atomic length based on the time metering system as close as possible in a time when the world.
Tip: Coordinated Universal Time, also known as the unified world time, Universal Time, Coordinated Universal Time, abbreviated UTC (Universal Coordinated Time).
Note: UTC time is the GMT (Greenwich Mean) time.
Browser Support
All major browsers support getUTCHours () method
grammar
return value
类型 | 描述 |
---|---|
Number | 该值是一个 0(午夜) ~ 23(晚上 11 点) 之间的整数。 |
technical details
JavaScript version: | 1.3 |
---|
More examples
Examples
Here, we will extract a specific date and time in UTC hours:
var n=d.getUTCHours();
n output
try it"
Displays the current UTC time
How getUTCHours (), getUTCMinutes () and getUTCSeconds () to display the current UTC time.