New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Time entries incorrectly recorded as negative #1007

Open
portfola opened this Issue Jul 22, 2017 · 4 comments

Comments

Projects
None yet
2 participants
@portfola

portfola commented Jul 22, 2017

Expected behaviour

I enter a time entry of 30min or 45min and it's recorded properly.

Actual behaviour

My 30min entry is recorded as -30min. The In and Out times are reverse to what I entered. My 45min entry is recorded as -15min. Although I entered 18:00-18:45, it is recorded as 18:30-18:15.

Steps to reproduce

Install a new version of v1.1.0.1389 with a clean database. Do not edit any of the default settings. Add time entries of 30 or 45min.

I first noticed this in some entries I added recently to an installation I created last month (June). I have re-installed it several times over with different versions but continue to get this error for entries of 30 or 45 min. What could be going wrong?

Reproducable on demo.kimai.org? [yes|no]

No

Kimai version [for example: dev 1.1.0.1389|github master|github develop]

v1.1.0.1389

Relevant log entries from log file (debug tab or temporary/logfile.txt)

22.07.2017 18:01:24] KSPI axAction (admin): add_edit_timeSheetEntry
[22.07.2017 18:01:24] timeEntry_create
[22.07.2017 18:01:25] KSPI axAction (admin): reload_timeSheet
[22.07.2017 18:03:33] KSPI axAction (admin): add_edit_timeSheetEntry
[22.07.2017 18:03:33] get_best_fitting_rate - using default rate 0.00
[22.07.2017 18:03:34] KSPI axAction (admin): reload_activities_options
[22.07.2017 18:03:34] KSPI axAction (admin): bestFittingRates
[22.07.2017 18:03:34] get_best_fitting_rate - using default rate 0.00
[22.07.2017 18:03:49] KSPI axAction (admin): add_edit_timeSheetEntry
[22.07.2017 18:03:49] timeEntry_create
[22.07.2017 18:03:50] KSPI axAction (admin): reload_timeSheet
[22.07.2017 18:04:53] KSPI axAction (admin): credits

@simonschaufi

This comment has been minimized.

Show comment
Hide comment
@simonschaufi

simonschaufi Aug 9, 2017

Member

the problem is the time of the server and your client. they seem to be different. we store the time serverside but display it clientside. if they are not the same, then negative values are possible.
if you can spot the line where the problem occurs and a way how to fix it, we would highly appreciate a pull request!

Member

simonschaufi commented Aug 9, 2017

the problem is the time of the server and your client. they seem to be different. we store the time serverside but display it clientside. if they are not the same, then negative values are possible.
if you can spot the line where the problem occurs and a way how to fix it, we would highly appreciate a pull request!

@portfola

This comment has been minimized.

Show comment
Hide comment
@portfola

portfola Aug 10, 2017

OK thank you for the response. I'll see what I can do about it, but likely to be little. Still, good to know.

portfola commented Aug 10, 2017

OK thank you for the response. I'll see what I can do about it, but likely to be little. Still, good to know.

@portfola

This comment has been minimized.

Show comment
Hide comment
@portfola

portfola Aug 16, 2017

@simonschaufi could you help me please to identify the files / functions for the serverside storage and clientside display of the time? I'd like to look into this but I'm new to this code.

portfola commented Aug 16, 2017

@simonschaufi could you help me please to identify the files / functions for the serverside storage and clientside display of the time? I'd like to look into this but I'm new to this code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment