Will this code work?

#include <DateTime.h>
#include <DateTimeStrings.h>
#include <Ethernet.h>

byte mac[] = { 0x33, 0x25, 0x71, 0x33, 0x38, 0x40 }; // whatever mac you want
byte ip[] = { 192, 168, 1, 247 }; //My IP
byte clockserver[] = { 64, 90, 182, 55 };

int cur_time;

void setup () {

   Ethernet.begin(mac, ip);
   Client clocksystem(clockserver, 37); //connect to TIME server
   
if (clocksystem.connect()) {

  cur_time = clocksystem.read();
 
  DateTime.sync(cur_time);
   
   clocksystem.stop();
}

}

void loop() {
if( DateTime.Hour = 07) {
  //feed fish at 7 in the morning
}
}

I'm trying to create a timer that feeds my fish at 7am and grabs the time from the TIME server. I'm away from my home right now (and arduino) so I just need to know If this will do what I want it to or if it will just not work...

Thanks,
Elijah

Ignoring everything else I think I can see one problem...

void loop() {
if( DateTime.Hour = 07) {
//feed fish at 7 in the morning
}

This will feed the fish for the entire hour! And your code will likely be running several times a second...

Ok...that would NOT be good! (-: How would I make it feed my fish just once at 7 in the morning everyday?

actually, it will constantly feed the fish. I think you intended:
if( DateTime.Hour == 07)

Have a look at the Time library, it has support for NTP time servers and there is a TimerAlarm companion library that should do what you want.

http://www.arduino.cc/playground/Code/Time

Oh wow...the time library looks EXACTLY what I need! Thanks guys! I'll post my finished code soon...