You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi @matcool, I'm not one of the maintainers, but might be able to help you out:
dt1.diff(dt2) return time time between the moments that d1 and d2 occur. As you're specifically asking for now, but in two different timezones, it will be the same 'moment' of time, and therefore difference is 0.
To look it from a different angle, if you would screen "HEY" now while being in New York, and I would screen "HEY" now while being in Berlin, we will be screaming "HEY" at the same time: 0 hours difference.
If you want the difference in timezone offsets, you can use the offset property, which specifies the +/- number of seconds offset from UTC:
In [14]: (pendulum.now('Europe/Berlin').offset-pendulum.now('America/New_York').offset) /3600Out[14]: 6.0
I wanted to check the hours difference between two timezones, but instead I got 0
Example: (this happens with any two timezones)
The text was updated successfully, but these errors were encountered: