RTC integration with Arduino MEGA

Can you post the code that works.