获取当前时间所在当天的本地零点时间
time_point contract::last_zeto_time_point(time_point last_do_time_point) {
uint64_t days_count = (last_do_time_point.time_since_epoch().count() + (8 * one_hour_msec)) / one_day_msec;
uint64_t days_msec = days_count * one_day_msec;
days_msec -= (8 * one_hour_msec);
return time_point(microseconds(days_msec));
}
获取当前时间所在当天的本地第二天的零点时间
time_point contract::next_zeto_time_point(time_point last_do_time_point) {
return last_zeto_time_point(last_do_time_point) + microseconds(one_day_msec);
}
版权属于:区块链中文技术社区 / 转载原创者
本文链接:https://www.bcskill.com/index.php/archives/949.html
相关技术文章仅限于相关区块链底层技术研究,禁止用于非法用途,后果自负!本站严格遵守一切相关法律政策!