GMTIME (The GNU Fortran Compiler)

### 8.138 `GMTIME` — Convert time to GMT info ¶

Synopsis:

  `CALL GMTIME(TIME, VALUES)`

Description:

  Given a system time value TIME (as provided by the `TIME` — Time function intrinsic), fills VALUES with values extracted from it appropriate to the UTC time zone (Universal Coordinated Time, also known in some countries as GMT, Greenwich Mean Time), using `gmtime(3)`.

  This intrinsic routine is provided for backwards compatibility with GNU Fortran 77. In new code, programmers should consider the use of the `DATE_AND_TIME` — Date and time subroutine intrinsic defined by the Fortran 95 standard.

Class:

  Subroutine

Arguments:

  TIME | An `INTEGER` scalar expression corresponding to a system time, with `INTENT(IN)`.
  VALUES | A default `INTEGER` array with 9 elements, with `INTENT(OUT)`.

Return value:

  The elements of VALUES are assigned as follows:

  1. Seconds after the minute, range 0–59 or 0–61 to allow for leap seconds
  2. Minutes after the hour, range 0–59
  3. Hours past midnight, range 0–23
  4. Day of month, range 1–31
  5. Number of months since January, range 0–11
  6. Years since 1900
  7. Number of days since Sunday, range 0–6
  8. Days since January 1, range 0–365
  9. Daylight savings indicator: positive if daylight savings is in effect, zero if not, and negative if the information is not available.
Standard:

  GNU extension

See also:

  `DATE_AND_TIME` — Date and time subroutine,
  `CTIME` — Convert a time into a string,
  `LTIME` — Convert time to local time info,
  `TIME` — Time function,
  `TIME8` — Time function (64-bit)