How do I send an object of type struct tm
via byte socket to a server? I know how to send the single bytes of int64_t and others, but afaik time_t depends on the OS where the program is used.
Is there any C++ internal function that can return a known type (for example int64_t) representing a date? Or is it best to create an own format / class, that uses the following code for creation
time_t raw_time;
time(&raw_time);
//UTC zone, because we just need the moment in time and not the timezone
struct tm* ptm = gmtime(&raw_time);
and calculates an int64_t on its own?