is there any class for update time and date automaticaly else does we need to write code for it

i am using "Date/Time Edit" widget in designer and i haven't seen any member funtion in that to update automaticaly