current_time Function

public function current_time()

Returns the current date and time in the same format as the compile_time function.

Arguments

None

Return Value character(len=20)


Called by

proc~~current_time~~CalledByGraph proc~current_time current_time proc~write_data write_data proc~write_data->proc~current_time

Contents

Source Code


Source Code

  function current_time()
    !* Author: Chris MacMackin
    !  Date: November 2016
    !
    ! Returns the current date and time in the same format as the
    ! [[compile_time]] function.
    !
    character(len=20) :: current_time
    integer(i8), dimension(8) :: time_vals
    call date_and_time(values=time_vals)
    write(current_time,time_format) months(time_vals(2)), time_vals(3), &
                                    time_vals(1), time_vals(5), time_vals(6), &
                                    time_vals(7)
  end function current_time