Getting date/time from PC to set RTC

Complex multi-gates system with several Arduino boards and radios communicating with a “central” unit.
When a gate is activated (open, stop, close), the gate controller sends a message to the central, where date, time, operation, user etc are logged on an SD high volume card. The central adds date and time to the log before writing it to the SD card, reading time and date from the Velleman RTC.
When connecting the PC to the controller (USB), using functions, I want to reset the date/time on the RTC, reading the PC date/time.
How could I do that?
(I can set the RTC manually, but I want it automatic, each time I connect the USB)
partial code:

void USB_command()
  char msg[100];
  int i;
  // execute a command from Arduino monitor
  // Read the header byte to determine the type of command
  msg[0] =;
  while (!Serial.available());
  switch (msg[0])
    case 0x01:  // Central request for log
    case 0x02:  // Write dummy log to SD card
void loop() 
  if (key_check() > -1) // any key gets the menu (options such as download and erase LOGs from SD card)
  if (Serial.available()) // USB MESSAGE FROM MONITOR
    USB_command();        // execute the command, ie reset the clock
  if (ZetaSerial.available())  // ZETAPLUS MESSAGE FROM GATES