Skip to content

Commit

Permalink
added UTC time for datatypes
Browse files Browse the repository at this point in the history
  • Loading branch information
johnhenning committed Mar 14, 2020
1 parent 5ed5b68 commit 67f3f6b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
6 changes: 3 additions & 3 deletions frater/data_type/data_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@

@dataclass
class DataType(DataClassJsonMixin):
created: str = field(default_factory=datetime.now)
updated: str = field(default_factory=datetime.now)
accessed: str = field(default_factory=datetime.now)
created: str = field(default_factory=datetime.utcnow)
updated: str = field(default_factory=datetime.utcnow)
accessed: str = field(default_factory=datetime.utcnow)

@classmethod
def data_type(cls):
Expand Down
4 changes: 4 additions & 0 deletions frater/utilities/datetime.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,7 @@

def now():
return datetime.datetime.now().isoformat()


def utcnow():
return datetime.datetime.utcnow().isoformat()
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

setup(
name='frater',
version='0.3.1.8',
version='0.3.1.9',
packages=packages,
license='MIT',
url='https://github.com/frater-sdk/frater',
Expand Down

0 comments on commit 67f3f6b

Please sign in to comment.