Quote by Joe: I think I found the issue with changing timezones and the story edit not working properly.
On line 910, I changed the DB_save call a little. Instead of storing $date, I changed it to FROM_UNIXTIME($unixdate).
That seemed to solve the issue with having a different time after a story is stored.
I actually found that the reason this works, because loggically it shouldn't as you're theoretically still using the same date. However you are not, some code above this actually changes $unixdate and updates it to the current value returned by time()
Text Formatted Code
$date = date("Y-m-d H:i:s",$unixdate); #### here $date is set from $unixdate
if (empty($hits)) {
$hits = 0;
}
// Get draft flag value
if ($draft_flag == 'on') {
$draft_flag = 1;
} else {
$draft_flag = 0;
// OK, if this story was already in the database and the user
// changed this from a draft to an actual story then update the
// date to be now
if (DB_count($_TABLES['stories'],'sid',$sid) == 1) {
if (DB_getItem($_TABLES['stories'],'draft_flag',"sid = '$sid'") == 1) {
$unixdate = time(); #### here it is changed
}
}
}
so a better fix is to move the assignment to $date below this code block, in theory anyway. I haven't fully tested this out yet.