say for example a user uses a remote computer to access a php file from a server, the page is a reply form where the user could input some text. After the user pressed the submit button, the message and date-time(date function was used) is recorded to the server. The date-time that got recorded was the current date on the remote computer, not from the server.
am i missing something?
needs some clarification of the date() function of php
Moderator: General Moderators
-
urboyfriend
- Forum Newbie
- Posts: 11
- Joined: Tue Sep 06, 2011 6:29 pm
Re: needs some clarification of the date() function of php
The PHP date() function returns the date-time of the server operating system in the time zone specified in the PHP configuration file. If some other date-time is being recorded, either it is being sent from the client or the server code does something else to adjust for the time zone of the client. Without seeing the code, there's no way to answer your question.
-
urboyfriend
- Forum Newbie
- Posts: 11
- Joined: Tue Sep 06, 2011 6:29 pm
Re: needs some clarification of the date() function of php
nvm got the idea whose current date-time is being recorded