i want to get current time but it returns seconds from 1/1/1970. Is there any additional function or method
If your problem is how to convert it in a string showing current date and time you can do in this way:
time_t rawTime = time ( NULL );
// you have current time in seconds from 1/1/1970
struct tm *locTime = localtime ( &rawTime );
// get a struct with local time
string currentTimeStr = = asctime ( locTime );
// get a string representation of current time