convert time_stats['human_total_time_spent'] str to int representing minutes or seconds #2355
-
We want to collect time spent on different projects. The issue for different projects are labeled with project name labels. We will summarize by these labels so we can know by project how much time is spent on them. The human_total_time_spent attribute of time_stats for each issue is presented in string format as you would see it on an issue. For example, it will return https://docs.gitlab.com/ee/user/project/time_tracking.html#available-time-units I want to convert this into total minutes. I don't see a datetime library function that will do this. If I simply got "seconds" back from gitlab I could easily sum and convert that into any form I want. Any pointers? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
@walterrowe I think you're just looking for |
Beta Was this translation helpful? Give feedback.
@walterrowe I think you're just looking for
time_stats["total_time_spent"]
, which is in seconds. :)