AuHau / toggl-cli

A simple command-line interface for toggl.com

Home Page:https://toggl.uhlir.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Default duration 1 hour + x

rcrane opened this issue · comments

The stop function without parameters always adds 1 hour to the actual duration for no reason.
While the output is correct:
./toggl.sh -v stop
"general" stopped at 02:05PM and lasted for 17.0m48.0s
Toggle desktop and the website then say that the work has a duration of 1 hour plus 17 minutes.

I'm not sure if daylight saving time/summer time is part of the problem but using utcnow() solves the issue for me:

def now(self):
return self.tz.localize( datetime.datetime.now() )

def now(self):
return self.tz.localize( datetime.datetime.utcnow() )

@rcrane Probably setting your timezone at config .togglrc file should fix the issue (Timezones)

@figarocorso That makes sense. Thanks for the hint. I had a wrong entry in the config.