This is a follow up question to this question: Standard conformant way of converting std::time_t to System::DateTime?
I need to convert a c++11 time_t
to .NET DateTime
by a string. The program needs to take the value of the current time_t
, create a string which is going to be written to a file, and then another program which is written in C# is going to read that value and convert it to DateTime
.
The problem is that I don't have access to the C# code so I need to make the needed string in the c++ side. Currently, the C# side knows how to convert strings in this format:
2018-05-13T10:03:18.4195735+03:00
I'm not sure if this is a regular conventional string that represents a DateTime
and how exactly to create it.
Edit: In addition to the time_t
value I also got the milliseconds value as a chrono::seconds::rep
so you can just assume I got both