File tree 1 file changed +10
-4
lines changed
1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -7,11 +7,17 @@ Unix timestamp made easy.
7
7
``` py
8
8
from unix_time import *
9
9
10
- now = ts_now() # 1568122835 , 2019-09-10T13:40:35
11
- today = ts_today() # 1568073600, 2019-09-10T00:00:00
10
+ now = ts_now() # 1568078625 , 2019-09-10T01:23:45
11
+
12
12
yesterday = ts_yesterday() # 1567987200, 2019-09-09T00:00:00
13
+ today = ts_today() # 1568073600, 2019-09-10T00:00:00
14
+ tomorrow = ts_tomorrow() # 1568160000, 2019-09-11T00:00:00
15
+
16
+ from datetime import datetime
17
+
18
+ dt = datetime.fromisoformat(' 2019-09-10T01:23:45+00:00' )
13
19
14
- some_time = 1111111111 # 1111111111, 2005-03-18T01:58:31
15
- some_date = ts_date(some_time ) # 1111104000, 2005-03-18T00 :00:00
20
+ date_plus_time = ts(dt) # 1568078625, 2019-09-10T01:23:45
21
+ date_no_time = ts_date(dt ) # 1568073600, 2019-09-10T00 :00:00
16
22
```
17
23
You can’t perform that action at this time.
0 commit comments