If it is an android phone
Go to Settings > System > Date & Time > Automatic date & time
There you can find options like
-
Use netnetwork-provided time
-
Use GPS-provided time
-
Off
Select your preferance.
For iPhone:
Go to Settings > General > Date & time
Then select Set Automatically