fork download
  1. #include <iostream>
  2.  
  3. int main() {
  4. struct tm tm_init = {0};
  5. strptime("2012-10-26 16:00", "%Y-%m-%dT %H:%M", &tm_init);
  6. long epoch = mktime(&tm_init);
  7.  
  8. struct tm tm_rand;
  9. strptime("2012-10-26 16:00", "%Y-%m-%dT %H:%M", &tm_rand);
  10. epoch = mktime(&tm_rand);
  11.  
  12. return 0;
  13. }
Success #stdin #stdout 0s 3424KB
stdin
Standard input is empty
stdout
Standard output is empty