Arduino hangs after some time
Not sure if this will fix your problem, but this is a major error:

  char buf1[8], buf2[6];
  sprintf(buf1, "%08lu", myvote.mydate);
  sprintf(buf2, "%06lu", myvote.mytime);


Take a look at sprintf function reference


  A terminating null character is automatically appended after the content.


So, the text buffers are too small. It should be at least:

char buf1[9], buf2[7];