New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create arrow timezone interface and wrapper #912
Comments
There's even easier way to do this already: import arrow
arrow.now(tz="US/Pacific") I haven't seen a single function in arrow that didn't support strings as timezone definition. Additionally, arrow supports the "local" timezone. |
Yup, all timezone's of type |
Your point of view also has its advantages, for example, it's more optimal to only parse the timezone once, but I think if one is optimizing at such a detailed level, one wouldn't care that much about using |
I think the timezone approach would be very nice to have, even if the benefits are marginal. Would be nice if it's extended to do some timezone arithmetic without an actual date time behind it? |
Feature Request
It would be useful for users to directly import an arrow timezone object and create Arrow timezones rather than having to use
datetime.timezone
,ZoneInfo
, ordateutil.tz.gettz
. This will allow for full feature encapsulation within Arrow, so users can create timezones like this:This
arrow.timezone
wrapper can simply wrap theTzinfoParser
anddateutil.tz.gettz
logic and expose an easy-to-use interface for users.The text was updated successfully, but these errors were encountered: