Eve dates
ESI date helpers.
downtime_bracket(instant: Instant) -> tuple[Instant, Instant]
¶
Get the previous and next downtime around the given instant.
EVE downtime is currently at 11:00 UTC.
Downtime is when the servers go offline for maintenance and updates.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
instant
|
Instant
|
The Instant to find the downtime bracket for. |
required |
Returns:
| Type | Description |
|---|---|
tuple[Instant, Instant]
|
A tuple containing the previous downtime and the next downtime as Instants. If the instant is exactly at downtime, the previous downtime will be the same as the instant, and the next downtime will be the next downtime after the instant. |
Source code in src/pfmsoft/eve_snippets/eve/eve_dates.py
latest_schema_date() -> str
¶
Get the latest possible schema date as a string in the format YYYY-MM-DD.
EVE Esi schemas update at downtime, which is currently at 11:00 UTC. Since it is not possible to get a schema with a future compatibility date, we can use the previous EVE day as the latest possible schema date.
TODO verify this logic against the ESI.¶
Can try to request schema for latest_schema_date, and latest_schema_date + 1 day,¶
and see if the second request fails with a 404.¶
Returns:
| Type | Description |
|---|---|
str
|
Latest possible schema date as a string in the format YYYY-MM-DD. |
Source code in src/pfmsoft/eve_snippets/eve/eve_dates.py
next_downtime(instant: Instant | None = None) -> Instant
¶
Get the next downtime after the given instant.
EVE Esi schemas update at downtime, which is currently at 11:00 UTC. Since it is not possible to get a schema with a future compatibility date, we can use the previous EVE day as the latest possible schema date.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
instant
|
Instant | None
|
The instant to find the next downtime for. If None, the current instant will be used. |
None
|
Returns:
| Type | Description |
|---|---|
Instant
|
Next downtime as an Instant. |
Source code in src/pfmsoft/eve_snippets/eve/eve_dates.py
previous_downtime(instant: Instant | None = None) -> Instant
¶
Get the previous downtime before the given instant.
EVE Esi schemas update at downtime, which is currently at 11:00 UTC. Since it is not possible to get a schema with a future compatibility date, we can use the previous EVE day as the latest possible schema date.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
instant
|
Instant | None
|
The instant to find the previous downtime for. |
None
|
Returns:
| Type | Description |
|---|---|
Instant
|
Previous downtime as an Instant. If the instant is exactly at downtime, the previous downtime will be the same as the instant. |