RE: [PHP] Server date and time
Hi Christian, PHP code runs on the server, so any of the date/time functions which the language provides will give you the date/time on the server, rather than the client. HTH, Richy == Richard Black Senior Developer, DataVisibility Ltd - http://www.datavisibility.com Tel: 0141 951 3481 Email: [EMAIL PROTECTED] -Original Message- From: Christian Ista [mailto:[EMAIL PROTECTED]] Sent: 10 September 2002 17:08 To: [EMAIL PROTECTED] Subject: [PHP] Server date and time Hello, When a use insert the row in a table, I'd like to know the date and time of this insertion. Is there a function to know the server date and time, not the local time user ? Bye -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Server date and time
If you are using mysql, you can use the NOW() function to insert the time into a date field. It will insert the time that is on the server's clock. Adam On Tue, 10 Sep 2002, Christian Ista wrote: Hello, When a use insert the row in a table, I'd like to know the date and time of this insertion. Is there a function to know the server date and time, not the local time user ? Bye -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Server date and time
Hi Christian, Assuming that you use MySQL: Read up 6.2.2.2 The DATETIME, DATE, and TIMESTAMP Types in the MySQL manual. Hint: Add a column to hold the timestamps. Timo Am Dienstag den, 10. September 2002, um 18:08, schrieb Christian Ista: When a use insert the row in a table, I'd like to know the date and time of this insertion. Is there a function to know the server date and time, not the local time user ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php