Fortran SFF API to data I/O streams in C++

◆ SRCEdate()

libtime::TAbsoluteTime fapidxx::SRCEdate ( char *  date,
char *  time,
ftnlen  date_len,
ftnlen  time_len 
)

create appropriate time string for SRCE line

Definition at line 127 of file helper.cc.

References stringfromfstring().

Referenced by sff_wopenfs__(), and sff_wopens__().

129  {
130  std::string datestring=stringfromfstring(date, date_len);
131  std::string timestring=stringfromfstring(time, time_len);
132  std::string fulldate("");
133  fulldate+=datestring.substr(0,2);
134  fulldate+="/";
135  fulldate+=datestring.substr(2,2);
136  fulldate+="/";
137  fulldate+=datestring.substr(4,2);
138  fulldate+=" ";
139  fulldate+=timestring.substr(0,2);
140  fulldate+=":";
141  fulldate+=timestring.substr(2,2);
142  fulldate+=":";
143  fulldate+=timestring.substr(4,6);
144  libtime::TAbsoluteTime srcedate(fulldate);
145  return(srcedate);
146  } // libtime::TAbsoluteTime SRCEdate
std::string stringfromfstring(char *fstring, ftnlen slen)
create a C++ string from a Fortran string
Definition: helper.cc:51
Here is the call graph for this function:
Here is the caller graph for this function: