Get time from internet using url

Hi Team,

I have few questions.
Could anyone of you please assist me in this:

============================================
1 : a small shell script to get time from internet using curl, ( Say T1 )
2 : Wait for Random interval of time between 30 sec to 1 min, and get time again.
3 : Keep repeating #2 till you get time where seconds are divisible by 5 ( 5,10,15, etc )
4 : Saves T1, T2 and Diff in time in seconds a file by unique Name.

Moderator comments were removed during original forum migration.