#include <iostream>
#include <ctime>
using namespace std;
int main()
{
time_t timer;
struct tm *horarioLocal;
time(&timer); // Obtem informações de data e hora
horarioLocal = localtime( &timer ); // Converte a hora atual para a hora local
int dia = horarioLocal->tm_mday;
int mes = horarioLocal->tm_mon + 1;
int ano = horarioLocal->tm_year + 1900;
int hora = horarioLocal->tm_hour;
int min = horarioLocal->tm_min;
int sec = horarioLocal->tm_sec;
cout << "Horário: " << hora << ":" << min << ":" << sec << endl;
cout << "Data: " << dia << "/" << mes << "/" << ano << endl;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8Y3RpbWU+Cgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IG1haW4oKQp7CiAgdGltZV90IHRpbWVyOwogIHN0cnVjdCB0bSAqaG9yYXJpb0xvY2FsOwoKICB0aW1lKCZ0aW1lcik7IC8vIE9idGVtIGluZm9ybWHDp8O1ZXMgZGUgZGF0YSBlIGhvcmEKICBob3JhcmlvTG9jYWwgPSBsb2NhbHRpbWUoICZ0aW1lciApOyAvLyBDb252ZXJ0ZSBhIGhvcmEgYXR1YWwgcGFyYSBhIGhvcmEgbG9jYWwKCiAgaW50IGRpYSA9IGhvcmFyaW9Mb2NhbC0+dG1fbWRheTsKICBpbnQgbWVzID0gaG9yYXJpb0xvY2FsLT50bV9tb24gKyAxOwogIGludCBhbm8gPSBob3JhcmlvTG9jYWwtPnRtX3llYXIgKyAxOTAwOwogIGludCBob3JhID0gaG9yYXJpb0xvY2FsLT50bV9ob3VyOwogIGludCBtaW4gID0gaG9yYXJpb0xvY2FsLT50bV9taW47CiAgaW50IHNlYyAgPSBob3JhcmlvTG9jYWwtPnRtX3NlYzsKICAKICBjb3V0IDw8ICJIb3LDoXJpbzogIiA8PCBob3JhIDw8ICI6IiA8PCBtaW4gPDwgIjoiIDw8IHNlYyA8PCBlbmRsOwogIGNvdXQgPDwgIkRhdGE6ICIgPDwgZGlhIDw8ICIvIiA8PCBtZXMgPDwgIi8iIDw8IGFubyA8PCBlbmRsOwoKICByZXR1cm4gMDsKfQ==