This topic is locked

Setting to local time

12/29/2008 11:25:33 AM
PHPRunner General questions
S
swanside author

I have set a field to record the Date and Time a picture gets uploaded, but The server I use is in USA and so there is an 8 hour time difference.
In the visual editor can I not put something in the visual editor to make it get its time from the PC which is uploading the file, or just set it to GMT?
Cheers

J
Jane 12/30/2008

Hi,
here is a sample:

date('Y-m-d', strtotime("-8 hour"))

S
swanside author 12/30/2008

Hi,

here is a sample:



Thanks Jane.

That is good, but I have friens in Australia, and Spain, so they all get a differnt time.
Is there a way of submitting the information at the local PC time?
Thanks
Paul.

J
Jane 1/5/2009

Hi,
use JavaScript code to fill your date field with current time.

JavaScript code is executed on the client machine and returns correct date and time.

S
swanside author 1/5/2009

Hi,

use JavaScript code to fill your date field with current time.

JavaScript code is executed on the client machine and returns correct date and time.


Thanks Jane