// Collection of code snippets by Arne Vajhøj 
// (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
#include <iostream>
#include <ctime>

using namespace std;

int main()
{
   time_t t = time(NULL);
   cout << ctime(&t) << endl;
   char buf[33];
   strftime(buf,sizeof(buf),"%d-%m-%Y %H:%M:%S",localtime(&t));
   cout << buf << endl;
   return 0;
}
