I've found this post to be very helpful as this is exactly what I'm trying to accomplish. However, my PHP skills are minimal at best and I'm not understanding how to do this exactly. Here's what I've done to try to implement your suggestion:
I've added these lines just before the end of my form:
<?php
$offset = -8*3600;
$current_local_time = time() + $offset;
date("h:i:s", $current_local_time);
?>
and in my insert section I have:
if ((isset($POST["MM_insert"])) && ($POST["MM_insert"] == "insertForm")) {
$insertSQL = sprintf("INSERT INTO user_tbl (user_id, user_password, role, user_first_name, user_last_name, date_added) VALUES (%s, %s, %s, %s, %s, %s)",
GetSQLValueString($POST['user_id'], "text"),
GetSQLValueString($POST['password'], "text"),
GetSQLValueString($POST['role'], "int"),
GetSQLValueString($POST['first_name'], "text"),
GetSQLValueString($_POST['last_name'], "text"),
GetSQLValueString(date("Y-m-d H:i:s"), "date"));
but the time that gets stored in my database is still the server time which is 3 hours ahead of my time. What am I missing (besides knowledge and ability 😕 )?
Thank you for taking the time to respond. I'm sure this is a simple problem but I'm simpy stuck.