Python 设置系统时间,代码如下:
适用于windows系统
import osimport datetime#设定日期_date = datetime.datetime.strptime("2019/05/25","%Y/%m/%d")#设定时间为 0点30分_time = '00.30'#设定时间os.system('time {}'.format(_time))os.system('date {}'.format(_date))
博客园 © 2004-2025 浙公网安备 33010602011771号 浙ICP备2021040463号-3