33 character(len
=*),
intent(out) :: date_string
35 character (
len=8) :: current_date
36 character (
len=10) :: current_time
37 character (
len=5) :: time_zone
39 integer :: date_values(
8)
42 character (
len=2) :: month_string, day_string, hour_string,
&
43 minute_string, seconds_string
45 character (
len=4) :: year_string
47 call date_and_time(current_date, current_time, time_zone, date_values)
49 write (year_string,
'(i4.4)') date_values(
1)
50 write (month_string,
'(i2.2)') date_values(
2)
51 write (day_string,
'(i2.2)') date_values(
3)
52 write (hour_string,
'(i2.2)') date_values(
5)
53 write (minute_string,
'(i2.2)') date_values(
6)
54 write (seconds_string,
'(i2.2)') date_values(
7)
56 date_string
= month_string
// '-' // day_string
// '-' // &
57 year_string
// ' ' // hour_string
// ':' // minute_string
// &
58 ':' // seconds_string
// '.' // current_time(
8:
10)
subroutine current_date_time(date_string)