- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 404
Description
- To pick up a draggable item, press the space bar. While dragging, use the arrow keys to move the item. Press space again to drop the item in its new position, or press escape to cancel.
- OS version and name: This is a docker container, so the output of
cat /proc/version
is this: Linux version 5.4.0-1071-aws (buildd@lcy02-amd64-020) (gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04)) - Pendulum version: 2.1.2
Issue
In a docker container with no timezone configuration (presumably), from_format
errors out when passing in the timezone parameter. For example, this line from the docs: pendulum.from_format('1975-05-21 22', 'YYYY-MM-DD HH', tz='Europe/London')
will spit out the error RuntimeError: Unable to find any timezone configuration
. This same behavior happens when I try to run something like pendulum.now()
with no arguments which makes sense because I'm assuming it's trying to get the local time but can't. In our docker container we strictly do not want anything to use local time when it's not needed which is why there is no timezone configuration and I feel like it's completely unnecessary here. If I pass in the tz
parameter it shouldn't need to rely on local time at all. Looking at the source code, I'm pretty sure this is because now()
is being used here: https://github.com/sdispater/pendulum/blob/f1df7dc3f838bd4ab1075ba25c8b6ce5d8141995/pendulum/__init__.py#L238. I'd love to use pendulum in our production server given the ease of managing timezones, but this behavior is completely blocking it and rendering it unusable right now.
Activity
[-]from_format tries to find the local timezone configuration when that shouldn't be needed[/-][+]breaking: from_format tries errors out when there is no local timezone configuration but timezone is passed in[/+][-]breaking: from_format tries errors out when there is no local timezone configuration but timezone is passed in[/-][+]breaking: from_format errors out when there is no local timezone configuration but timezone is passed in[/+]raprocks commentedon May 13, 2023
any update on this?
ayoung19 commentedon May 24, 2023
i believe this was fixed
ayoung19 commentedon May 24, 2023
@sdispater my opened pr has conflicts and it seems like you completely changed the code, could you confirm this has been fixed?
raprocks commentedon May 24, 2023
Will update and try, was still facing the issue on latest