Project

General

Profile

Actions

Defect #36385

closed

Баги

Added by Roman Kharchenko almost 3 years ago. Updated almost 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
REST API
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Wont fix
Affected version:

Description

Hello.
Rest api GET /time_entries.json gives time in wormat 0.75.
Can I change the date format to 0.45 h?

Since you have very rough rounding and the time does not correspond to reality.
Or how can I get the total elapsed time of a user for a date.

Best regards,
Roman (redmine-evolution.com)

Actions #1

Updated by Holger Just almost 3 years ago

  • Status changed from New to Closed
  • Resolution set to Wont fix

The logged time entries are always stored as a fractional hours (i.e. the format you also get from the API). The 45 minutes in your example are thus stored as 0.75 hours in the database and returned as such to API requests. The returned data is as precise as possible given the underlying data format in the database.

If you want to convert the returned value to hours / minutes on your client (e.g. when showing the data somewhere), you need to multiply the fractional part of the number by 60 yourself.

Actions

Also available in: Atom PDF