docker-library / docker-library/python

bullseye images has issue with mktime OverflowError

Open
#815 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Dockerfile
Stars
2.8k
Forks
1.1k
Avg merge
3d 1h
Merged PRs (30d)
1

Description

Hi
We are trying to run the following code snippet on bullseye after installing pytz

from datetime import datetime
import time
import pytz
tz=pytz.timezone('America/New_York')
nytime= datetime.utcnow().astimezone(tz)
time.mktime(nytime.timetuple())

But we get the following exception:
OverflowError: mktime argument out of range

Knowing that it works normally in buster images.
Is there any OS dependency that I need to install for bullseye?
Thank you

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the provided Python snippet with pytz in the Bullseye and Buster images, then compare the runtime and OS dependencies involved in time.mktime. Determine whether the Bullseye image needs a documented dependency or packaging change, and confirm that the snippet no longer raises OverflowError.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, python
Domain
devops, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.