Skip to content

Commit 661a171

Browse files
fix datetime bug
1 parent 7b0cd3a commit 661a171

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ A simple Python utility to check whether an IP address or hostname belongs to a
44

55
`cloud_providers.json` contains lists of domains and up-to-date CIDRs for each cloud provider (updated daily via CI/CD).
66

7-
Used by [Bighuge BLS OSINT Tool (BBOT)](https://github.com/blacklanternsecurity/bbot).
7+
Used by [BBOT](https://github.com/blacklanternsecurity/bbot) and [BBOT Server](https://github.com/blacklanternsecurity/bbot-server).
88

99
## Installation
1010
~~~bash

cloudcheck/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ def check(ip):
99

1010
async def update(cache_hrs=168 + 24, force=False):
1111
time_since_last_update = datetime.now() - cloud_providers.last_updated
12-
hours_since_last_update = time_since_last_update / 60 / 60
12+
hours_since_last_update = time_since_last_update.total_seconds() / 3600
1313
if force or hours_since_last_update >= cache_hrs:
1414
await cloud_providers.update()

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "cloudcheck"
3-
version = "6.0.0.0"
3+
version = "7.1.0.0"
44
description = "Check whether an IP address belongs to a cloud provider"
55
authors = ["TheTechromancer"]
66
license = "GPL-3.0"
@@ -39,4 +39,4 @@ build-backend = "poetry_dynamic_versioning.backend"
3939
[tool.poetry-dynamic-versioning]
4040
enable = true
4141
metadata = false
42-
format-jinja = 'v7.0.{{ distance }}'
42+
format-jinja = 'v7.1.{{ distance }}'

0 commit comments

Comments
 (0)