Is there any reason this code snippet won't do what it's supposed to do?

I'm learning socket programming and there's a simple program that tells the time but I think MSVC isn't building this code because of deprecated code.

Code:
#include <stdio.h>
#include <time.h>


int main() {
	time_t timer;
	time(&timer);
	char buf[26];

	printf_s("Local time is: %d", ctime_s(buf,sizeof(buf), &timer));
	return 0;
}
When I run this code all I get is this....

Code:
Local time is: 0
How do i get this to show the time from my computer?