Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix user time zone issue with reminder datetime. Fix for #766. #969

Merged
merged 1 commit into from
Mar 15, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions modules/Reminders/Reminder.php
Original file line number Diff line number Diff line change
Expand Up @@ -279,12 +279,14 @@ public static function addNotifications(jsAlerts $alert, $checkDecline = true)
return;
}

//Create separate variable to hold timedate value
$alertDateTimeNow = $timedate->nowDb();
// Create separate variable to hold timedate value
// These timedates need to be in the user time zone as the
// datetime returned by the Bean below is in the user time zone
$alertDateTimeNow = $timedate->getNow(true)->asDb(false);

// cn: get a boundary limiter
$dateTimeMax = $timedate->getNow()->modify("+{$app_list_strings['reminder_max_time']} seconds")->asDb();
$dateTimeNow = $timedate->nowDb();
$dateTimeMax = $timedate->getNow(true)->modify("+{$app_list_strings['reminder_max_time']} seconds")->asDb(false);
$dateTimeNow = $timedate->getNow(true)->asDb(false);

$dateTimeNow = $db->convert($db->quoted($dateTimeNow), 'datetime');
$dateTimeMax = $db->convert($db->quoted($dateTimeMax), 'datetime');
Expand Down Expand Up @@ -724,4 +726,4 @@ public static function getRemindersListInlineEditView(SugarBean $event)

}

?>
?>