strftime('%s', 'now', '+8 hour') 格式化为当前时间的秒数
strftime('%M', 'now', '+8 hour') 格式化当前时间为分钟数
strftime('%H', 'now', '+8 hour') 格式化当前时间为小时
strftime('%Y-%m-%d %H:%M:%S', 'now', '+8 hour') 格式化当前时间为 %Y-%m-%d %H:%M:%S
strftime('%M', '2018-12-12 18:32:11') 把指定字符串格式化为分钟
时间相减
当前时间换算成秒数 减去指定时间(换算成秒数) 得到的是秒数
strftime('%s', 'now', '+8 hour') - strftime('%s', '2018-12-12 18:32:11')
.............................................................................得到分钟
strftime('%M', 'now', '+8 hour') - strftime('%M', '2018-12-12 18:32:11')
.............................................................................得到小时
strftime('%H', 'now', '+8 hour') - strftime('%H', '2018-12-12 18:32:11')