wrong date time inserted in DB
Hi all,
I have an insert record on my page and I've set an hidden field to get the current date time (...value="<?php echo(date("Y-m-d H:i:s")); ?>"...).
But once inserted the current time is not correct. It's about 13 hours back from current time.
Is there a way to set the current timezone?
I tried adding "<?php date_default_timezone_set("Europe/Rome");?>" as the very first row in my page but then server verification fails (error: header already sent).
How can I fix this?
TIA
tony
UPDATE: I just cleared the browser cache and it seems to work. Don't know why it stopped to work at first.