python-arrow

How can I get the timezone from an Arrow date object

How can I get the timezone from an Arrow date object Question: I need to retrieve the timezone from an Arrow date object Let’s take this as an example: import arrow arrow_date = arrow.get("2000-01-01", tzinfo="America/Toronto") How can I return this tzinfo exactly as it is in the code above? I tried the following: arrow_date.format("ZZZ") but …

Total answers: 2

How to use arrow's string parsing, and simultaneously set a timezone?

How to use arrow's string parsing, and simultaneously set a timezone? Question: I would like, using arrow, to parse dates from strings. I do it via the documented way: >>> arrow.get(‘2013-05-05 12:30:45’, ‘YYYY-MM-DD HH:mm:ss’) <Arrow [2013-05-05T12:30:45+00:00]> The string is parsed with the timezone +00:00. Is it possible to force another timezone for this string? Converting …

Total answers: 2