Skip to content
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

til_decimalår smider OverflowError når gamle tidsserier omregnes #759

Open
krebslw opened this issue Jun 18, 2024 · 0 comments
Open

til_decimalår smider OverflowError når gamle tidsserier omregnes #759

krebslw opened this issue Jun 18, 2024 · 0 comments
Labels
bug Fejl i programmel

Comments

@krebslw
Copy link
Collaborator

krebslw commented Jun 18, 2024

Internt i til_decimalår anvendes time.mktime funktionen, som omregner til sekunder siden computerens referenceepoke.
For min pc er det fx. 1970-1-1 00.00.00. Umiddelbart ser det ud til at mktime ikke håndterer tidspunkter før referenceepoken.

Reproduktion af fejlen:

import time
import datetime

t=datetime.datetime(1967,11,2,0,0)

# her smides fejl
sekunder_siden_epoke = time.mktime(t.timetuple())

print(sekunder_siden_epoke)
```
@krebslw krebslw added the bug Fejl i programmel label Jun 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fejl i programmel
Projects
None yet
Development

No branches or pull requests

1 participant