python 获取自定义时间字符串 def getCurrentDateStr(): dt = datetime.now() time_str = dt.strftime('%m%d') return time_str