Cognizant interview question

One question is regarding taking current Date and time