I have
int year=2010;
int month=0; //starts from 0
int day=0; //starts from 0
int hour=0; //24 hours
int minute = 1
int second= 20;
int millisec=90;
How can I convert them into uint64_t
which contains milliseconds since Midnight Jan1 1970 (UTC time)?
Similar to UNIX time shown here
So the 7 ints in the above example would become: 1573603280090
uint64_t millisec = someFunction(); //<--which func to use?
this post discusses how to retrieve the time from chrono::time_point
, so it doesn't help me
this post asks how to convert string into utc time, but I have integers and wish to use them directly.
Using C++17