$ 0 0 You could try a combination of strptime and mktimestruct tm tm;time_t epoch;if ( strptime(timestamp, "%Y-%m-%d %H:%M:%S", &tm) != NULL ) epoch = mktime(&tm);else // badness