Returns datetime and string representations of the current time, minus the given hour
(hours)
| 307 | |
| 308 | |
| 309 | def time_since(hours): |
| 310 | """Returns datetime and string representations of the current time, minus the given hour""" |
| 311 | now = datetime.now() |
| 312 | # XXX : Add a minute or two to the delta (to avoid dropping issues)? |
| 313 | since = now - timedelta(hours=hours) |
| 314 | return since, since.strftime("%Y-%m-%dT%H:%M:%S") |
| 315 | |
| 316 | |
| 317 | def add_label_to_issues(issues) -> bool: |