I am working on a website. I want to show the server time in this website. The server time should not be changed if I chage my PC time.
Is it possible ? If possible and anyone knows how to do it then please reply with an example.
The PHP date() function will return the server time, you will need to check the servers time settings/local settings as it may be set to a different timezone than it actually resides in.
[fphp]date[/fphp] returns the server time by default, and you still must give it a formatting string. The primary purpose of date is to format a timestamp that was previously stored elsewhere, such as in a database.
[fphp]time[/fphp] returns the current time in seconds - the UNIX timestamp.
[fphp]microtime[/fphp] returns the current time in microseconds - this is primarily used to time script iteration (Call microtime at the very start of the script, and again at the very end, the difference will be the run time of the script).