Skip to content

Commit a2dc31d

Browse files
committed
* 新增 RFC 2832格式转时间字符串格式方法
1 parent 3aa5715 commit a2dc31d

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

CONTRIBUTING.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,18 @@
11
### 更新日志
22

3-
#### JadeV2.1.7 - 2024-01-31
4-
* 解决数据库清空的bug
5-
---
63

4+
#### JadeV2.1.8 - 2024-01-31
5+
* 新增 RFC 2832格式转时间字符串格式方法
6+
---
77

88

99
<details onclose>
1010
<summary>查看更多更新日志</summary>
1111

12+
#### JadeV2.1.7 - 2024-01-31
13+
* 解决数据库清空的bug
14+
---
15+
1216
#### JadeV2.1.6 - 2024-01-11
1317
* 解决随机字符串的bug
1418
---

jade/jade_tools.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,11 @@ def timestr_to_time(time_str):
168168

169169
return time.mktime(time.strptime(time_str,"%Y-%m-%d %H:%M:%S"))
170170

171+
def timerfc_to_str(time_rfc):
172+
"""
173+
RFC 2832格式转时间字符串格式
174+
"""
175+
return timeint_to_timestr(time.mktime(time.strptime(time_rfc,'%a, %d %b %Y %H:%M:%S %z')))
171176

172177

173178
def timefloat_to_timestr(floatstring):

0 commit comments

Comments
 (0)