Skip to content
Snippets Groups Projects
Commit d77425e8 authored by Luis Kornblueh's avatar Luis Kornblueh
Browse files

API fix for datetimeaddseconds.

parent 183383bd
No related branches found
No related tags found
No related merge requests found
......@@ -16,14 +16,13 @@ program tas
character(len=max_datetime_str_len) :: date_string
dti => newdatetime('2014-03-04T01:40:00')
dto => newdatetime('0001-01-01T00:00:00')
call datetimeToString(dti, date_string)
print *, date_string
secs = 600
dto = datetimeaddseconds(dti, secs)
dto => datetimeaddseconds(dti, secs)
call datetimeToString(dto, date_string)
print *, date_string
......@@ -56,7 +55,7 @@ program tas
call timedeltatostring(tdivisor, ctd)
print *, ctd
call divideTimeDeltaInSeconds(tdividend, tdivisor, tq)
! call divideTimeDeltaInSeconds(tdividend, tdivisor, tq)
print *, tq
......@@ -65,7 +64,7 @@ program tas
contains
function datetimeaddseconds(refdt, intvlsec) result(ret_datetime)
type(datetime), target :: ret_datetime
type(datetime), pointer :: ret_datetime
type(datetime), pointer :: refdt
integer, intent(in) :: intvlsec
......@@ -76,6 +75,8 @@ contains
call getptstringfromseconds(int(intvlsec,c_long), csec)
vlsec => newtimedelta(csec)
ret_datetime => newDatetime("0000-01-01T00:00:00.000");
ret_datetime = refdt + vlsec
call deallocatetimedelta(vlsec)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment