Skip to content

Commit

Permalink
bugfix: round first
Browse files Browse the repository at this point in the history
  • Loading branch information
shendric committed Jul 8, 2020
1 parent 7d13409 commit 03610a4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dateperiods/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ def label(self):
@property
def center(self):
tdelta_seconds = (self.tce.dt - self.tcs.dt).total_seconds()
return self.tcs.dt + timedelta(seconds=int(0.5*tdelta_seconds))
return self.tcs.dt + timedelta(seconds=int(round(0.5*tdelta_seconds, 0)))

@property
def date_label(self):
Expand Down

0 comments on commit 03610a4

Please sign in to comment.