Add disable_time_adjustment_protection option.

GitOrigin-RevId: 3a23943b294e2efdabb6c8e0ff606a2c62c05573
This commit is contained in:
levlam 2020-07-13 17:01:51 +03:00
parent b1ad61add3
commit 029ee5dd37
2 changed files with 7 additions and 0 deletions

View File

@ -161,6 +161,10 @@ void Global::save_server_time() {
}
void Global::do_save_server_time_difference() {
if (shared_config_ != nullptr && shared_config_->get_option_boolean("disable_time_adjustment_protection")) {
return;
}
// diff = server_time - Time::now
// fixed_diff = server_time - Clocks::system
double system_time = Clocks::system();

View File

@ -7007,6 +7007,9 @@ void Td::on_request(uint64 id, td_api::setOption &request) {
if (set_boolean_option("disable_persistent_network_statistics")) {
return;
}
if (set_boolean_option("disable_time_adjustment_protection")) {
return;
}
if (request.name_ == "drop_notification_ids") {
G()->td_db()->get_binlog_pmc()->erase("notification_id_current");
G()->td_db()->get_binlog_pmc()->erase("notification_group_id_current");