ch 9/e5.c
//Function to update both date and time

Function to update both date and time
Function to update both date and time
struct date_time clock_keeper ( struct date_time x )
	{
		struct time time_update ( struct time now ) ;
		struct date dateUpdate ( struct date today ) ;
		x.stime = time_update ( x.stime ) ;
		if ( x.stime.hours == 0 && x.stime.minutes == 0 && x.stime.seconds == 0 )
			x.sdate = dateUpdate ( x.sdate ) ;
		return x ; 
	}
struct date_time clock_keeper ( struct date_time x ) { struct time time_update ( struct time now ) ; struct date dateUpdate ( struct date today ) ; x . stime = time_update ( x . stime ) ; if ( x . stime . hours == 0 && x . stime . minutes == 0 && x . stime . seconds == 0 ) x . sdate = dateUpdate ( x . sdate ) ; return x ; }
Function to update both date and time
Function to update both date and time
//Function declarations
 //Function call to update time
 //Check if time crosses midnight - update date
