Parameters
Return Value
A pointer to a tm structure with the time information filled in.This structure is statically allocated and shared by the functions gmtime and localtime. Each time either one of these functions is called the contents of this structure is overwritten.
Example
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
|
Output:
Current time around the World: Phoenix, AZ (U.S.) : 8:26 Reykjavik (Iceland) : 15:26 Beijing (China) : 23:26 |
See also
| asctime | Convert tm structure to string (function) |
| ctime | Convert time_t value to string (function) |
| localtime | Convert time_t to tm as local time (function) |
| mktime | Convert tm structure to time_t (function) |
| time | Get current time (function) |
