 
  /* ******** Ethernet Card Settings ******** */
 // Set this to your Ethernet Card Mac Address
-//byte mac[] = { 0x90, 0xA2, 0xDA, 0x0D, 0xBA, 0x72 };
+byte mac[] = { 0x90, 0xA2, 0xDA, 0x0D, 0xBA, 0x72 };
  
 /* ******** NTP Server Settings ******** */
 /* us.pool.ntp.org NTP server
    (Set to your time server of choice) */
-//IPAddress timeServer(132, 163, 4, 101);
+IPAddress timeServer(132, 163, 4, 101);
  
 /* Set this to the offset (in seconds) to your local time
-   This example is GMT - 6 */
-//const long timeZoneOffset = -18000L;  
+   This example is GMT - 5 */
+const long timeZoneOffset = -18000L;  
  
 /* Syncs to NTP server every 15 seconds for testing,
    set to 1 hour or more to be reasonable */
-//unsigned int ntpSyncTime = 60;        
+unsigned int ntpSyncTime = 300;        
  
  
 /* ALTER THESE VARIABLES AT YOUR OWN RISK */
 // local port to listen for UDP packets
-//unsigned int localPort = 8888;
+unsigned int localPort = 8888;
 // NTP time stamp is in the first 48 bytes of the message
-//const int NTP_PACKET_SIZE= 48;      
+const int NTP_PACKET_SIZE= 48;      
 // Buffer to hold incoming and outgoing packets
-//byte packetBuffer[NTP_PACKET_SIZE];  
+byte packetBuffer[NTP_PACKET_SIZE];  
 // A UDP instance to let us send and receive packets over UDP
-//EthernetUDP Udp;                    
+EthernetUDP Udp;                    
 // Keeps track of how long ago we updated the NTP server
-//unsigned int ntpLastUpdate = 0;    
+unsigned long ntpLastUpdate = 0;    
 // Check last time clock displayed (Not in Production)
 //time_t prevDisplay = 0;
 

  archiveRRD2.resetFile();
  //digitalWrite(4,HIGH);
  //digitalWrite(10,LOW);
  /*
 // Ethernet shield and NTP setup
 int i = 0;
 int DHCP = 0;
 DHCP = Ethernet.begin(mac);
 //Try to get dhcp settings 30 times before giving up
 
 while( DHCP == 0 && i < 30){
   delay(1000);
   DHCP = Ethernet.begin(mac);
   i++;
 }
 
 
 if(!DHCP){
  Serial.println("DHCP FAILED");
   //for(;;); //Infinite loop because DHCP Failed
 }
 Serial.println("DHCP Success");
 */
 //Try to get the date and time
/*
 int i=0;
 while(!getTimeAndDate() && i<1) {
   i++;
 }
*/
}

void loop()
{
  //digitalWrite(10,LOW);
    // Update the time via NTP server as often as the time you set at the top
    /*
  if(now()-ntpLastUpdate > ntpSyncTime) {
    int trys=0;
    while(!getTimeAndDate() && trys<1){
      trys++;
    }
    if(trys<1){
      Serial.println("ntp server update success");
    }
    else{
      Serial.println("ntp server update failed");
    }
  }
 
  // Display the time if it has changed by more than a second.
  if( now() != prevDisplay){
    prevDisplay = now();

     lowWord = word(packetBuffer[42], packetBuffer[43]);  
     epoch = highWord << 16 | lowWord;
     epoch = epoch - 2208988800 + timeZoneOffset;
     epoch = epoch + dstOffset(epoch);  //Adjust for DLT
     flag=1;
     setTime(epoch);
     ntpLastUpdate = now();
