获取当前时间
1 | now = arrow.utcnow() |
时间增减
1 | >>> one_hour_ago = now.replace(hours = -1) |
时区修改
1 | 'Asia/Shanghai') now_local = now.to( |
字符串转时间
1 | ' 2014-12-12T00:00:00.000+0800') arrow.get( |
时间戳
1 | now_local.timestamp |
格式化
1 | "YYYYMMDD") now_local.format( |
本地化个性时间短语
1 | now_local.humanize() |