Setting Arduino's date and time?

juycce:
hi there can i ask a question,the DS1307 RTC have battery backup so it doesnt lose the time...but what about hour change?(when clock turn fwd and bckwd) do i have to change the arduino values allways?or is there any way to do it buy it self..thankyou

For my network (NTP) version I always use a timer which reverifies and resets the time. Once every 24 hours, for example, it gets the time from the NTP server and sets the internal clock. The frequency of your timer reset would be based on how much, or little, overhead you want to add to your loop()

For a version which isn't using the network you would have to build-in DST calculations, with additional location-based and timezone-based modifications, in to your code...