Your code works fine for me on my RTC shield.
I am not using any pull-up resistors on the I2C signals. Instead I just rely on the internal pull-ups.
I would suggest trying without the 10k you are using. And if you want to use external resistors, use something smaller like 4.7k. Make sure you put them on both the Clock and Data line, not just one of them.