In my C program, how can I get the date and time in the format `2013-01-11 23:34:21`?

I tried 

```
time_t now;
time(&now);
printf("%s", ctime(&now));

```

But it's giving it like `Fri Jan 11 23:50:33 2013`...

Thanks