Error with TimeSerial Example

I wanted to try out some of the code listed in the “Arduino Playground - Arduino Time library.” I downloaded the Time.h library and installed in the library folder. Then I loaded the first example sketch shown on the web page, shown below, into the Arduino 1.0 GUI.

#include <Time.h>  

#define TIME_MSG_LEN  11   // time sync to PC is HEADER followed by Unix time_t as ten ASCII digits
#define TIME_HEADER  'T'   // Header tag for serial time sync message
#define TIME_REQUEST  7    // ASCII bell character requests a time sync message 

// T1262347200  //noon Jan 1 2010

void setup()  {
  Serial.begin(9600);
}

void loop(){    
  if(Serial.available() ) 
  {
    processSyncMessage();
  }
  if(timeStatus()!= timeNotSet) 
    Serial.println("waiting for sync message");
  else     
      digitalClockDisplay();  
  delay(1000);
}

void digitalClockDisplay(){
  // digital clock display of the time
  Serial.print(hour());
  printDigits(minute());
  printDigits(second());
  Serial.print(" ");
  Serial.print(day());
  Serial.print(" ");
  Serial.print(month());
  Serial.print(" ");
  Serial.print(year()); 
  Serial.println(); 
}

void printDigits(int digits){
  // utility function for digital clock display: prints preceding colon and leading 0
  Serial.print(":");
  if(digits < 10)
    Serial.print('0');
  Serial.print(digits);
}

void processSyncMessage() {
  // if time sync available from serial port, update time and return true
  while(Serial.available() >=  TIME_MSG_LEN ){  // time message consists of header & 10 ASCII digits
    char c = Serial.read() ; 
    Serial.print(c);  
    if( c == TIME_HEADER ) {       
      time_t pctime = 0;
      for(int i=0; i < TIME_MSG_LEN -1; i++){   
        c = Serial.read();          
        if( c >= '0' && c <= '9'){   
          pctime = (10 * pctime) + (c - '0') ; // convert digits to a number    
        }
      }   
      setTime(pctime);   // Sync Arduino clock to the time received on the serial port
    }  
  }
}

When I upload I get the following error:

"TimeSerial.cpp: In function ‘time_t requestSync()’:
TimeSerial.pde:-1: error: ‘BYTE’ was not declared in this scope

As of Arduino 1.0, the ‘BYTE’ keyword is no longer supported.
Please use Serial.write() instead."

Any ideas how to fix this? I have not modified the library code or the example code.

Any ideas how to fix this?

Sure. Use Serial.write() instead. What's so hard to understand about that?

I am sure that is not the problem. Which Serial.print do you suggest I replace? In the code or in the library? I replaced the prints with writes and got 30 lines of errors, more than the frist time. This is an example code off the web site using the supplied library, it should work the first time.

Which Serial.print do you suggest I replace?

The one(s) that use BYTE as the second argument.

In the code or in the library?

Yes.

I replaced the prints with writes and got 30 lines of errors, more than the frist time.

Not surprising.

This is an example code off the web site using the supplied library, it should work the first time.

Well, of course, the "web wizards" should have fixed every piece of software ever posted anywhere on the web when the Arduino IDE changed.

Let me know when you have that working.

That code worked with the version of the IDE that was in common use when the code was posted. You could, of course, figure out what that version was, and go back to it.