Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // para p1.exe
- #include <time.h>
- #include <stdio.h>
- main()
- {
- int data;
- struct tm *ptr, *gm;
- time_t lt;
- lt=time(NULL);
- gm=gmtime(<);
- ptr=localtime(<);
- printf("GMTIME ----> ");
- printf(asctime(gm));
- printf("LOCALTIME -> ");
- printf(asctime(ptr));
- }
- Resultado:
- GMTIME ----> Sat Feb 18 09:03:43 2017
- LOCALTIME -> Sat Feb 18 09:03:43 2017
- // para p2.exe
- #include <time.h>
- #include <stdio.h>
- main()
- {
- int data;
- struct tm *ptr, *gm;
- time_t lt;
- lt=time(NULL);
- gm=gmtime(<);
- printf("GMTIME ----> ");
- printf(asctime(gm));
- ptr=localtime(<);
- printf("LOCALTIME -> ");
- printf(asctime(ptr));
- }
- Resultado:
- GMTIME ----> Sat Feb 18 11:04:00 2017
- LOCALTIME -> Sat Feb 18 09:04:00 2017
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement