Skip to content

Commit

Permalink
adds epoch
Browse files Browse the repository at this point in the history
  • Loading branch information
a-tal committed May 31, 2018
1 parent e3e783a commit 6a2c591
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions eve_glue/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
"""EVE-specific helpers for ESI endpoints."""


from datetime import datetime

from eve_glue.location_type import resolve_location_type_enum # noqa
from eve_glue.location_flag import PersonalLocationFlagEnumV1 # noqa
from eve_glue.location_flag import PersonalLocationFlagEnumV2 # noqa
Expand All @@ -13,3 +15,11 @@
from eve_glue.containers import ActionsEnumV1, PasswordTypeEnumV1 # noqa
from eve_glue.poco import StructureStateEnumV1 # noqa
from eve_glue.faction_warfare import SystemContestationState # noqa


# EVE Online was released on May 6, 2003
# this specific time is used in place of None where an
# attribute must be returned as dt but no time data exists
EPOCH = 1052179200
EPOCH_DT = datetime.utcfromtimestamp(EPOCH)
EPOCH_STR = EPOCH_DT.strftime("%Y-%m-%dT%H:%M:%SZ")

0 comments on commit 6a2c591

Please sign in to comment.