-
Notifications
You must be signed in to change notification settings - Fork 23
Open
Description
| Write Input | DB Storage | On Read (as relativedelta) |
|---|---|---|
| P2M1DT6H | "2 mons 1 day 06:00:00" | 61 days 6 hours |
| P1M | "1 mon" | 30 days |
| P3M | "3 mons" | 90 days |
| P1Y | "1 year" | 365 days |
I was expecting this field to store and retrieve the data in same format. But, the current behaviour is not different from Duration field except that this has more sophisticated options for inputting data.
On some debugging, I noticed that django is reading the values as timedelta by default and then relativedelta field gets hook for transforming the read value.
my requirements.txt
Django==3.2.5
django-relativedelta==1.1.2
psycopg2-binary==2.9.1
PS: I can create a PR if you can suggest on a way how to fix this.
Metadata
Metadata
Assignees
Labels
No labels