无论我在句号后放什么都得到0。为什么?
import pendulum
home = 'Europe/Berlin'
away = 'America/New_york'
a = pendulum.now(home)
b = pendulum.now(away)
print(a)
print(b)
dif = b.diff(a)
print (dif)
di = dif.in_hours()
print (di)
d = dif.hours
print (d)
输出 :
2019-02-23T21:20:22.738058+01:00
2019-02-23T15:20:22.738058-05:00
Period [2019-02-23T15:20:22.738058-05:00 -> 2019-02-23T21:20:22.738058+01:00]
0
0