Actual Utc Time

Current Utc time

The module is an answer to the question "What time is it?". Delivers the current local or UTC time with an optional increment. Includes local time, including summer time, for selected cities.

5.1. Retrieve the actual date and time

Want to get the actual date and time from the user's computer, either as either Coordinated Universal Time (UTC) or Coordinated Universal Time (LST). Call-up the time functions from the headers and pass the value 0 as parameters. It is possible to use the use of the fmtime utility to transform the time_t value into a tm tree that represents the actual UTC time (alias Greenwich Mean Time or GMT); or the use of the fmtime utility to transform the time_t value into a tm tree that represents the time.

In example 5-1, the programme receives the actual date/time, transforms it into locale time and displays it.

" Asctime( localtm)

Auch interessant

Mehr zum Thema