While working with your API I encountered the requirement of adding a timezone to a new time entry.
The timezone will be used for startDateLocal
and startTimeLocal
to calculate the correct startDateUtc
and startTimeUtc
if not already given in the correct format.
Analog for end....
Is there a special reason to make use of utc and local? And I noticed that a entry will be displayed inside the awork gui with it local time without calculate the wrong difference between my actual timezone and the timezone that is in the time entry.
Example:
My Settings: timezone = Europe/Berlin
Create/Update time entry with:
{
"projectId": "51a8xe5",
"isBillable": true,
"note": "Test 2",
"startDateUtc": "2024-06-21T00:00:00Z",
"startTimeUtc": "17:00:00",
"startDateLocal": "2024-06-21T00:00:00Z",
"startTimeLocal": "10:00:00",
"endDateUtc": "2024-06-21T00:00:00Z",
"endTimeUtc": "18:10:00",
"endDateLocal": "2024-06-21T00:00:00Z",
"endTimeLocal": "11:10:00",
"userId": "836bc7xc25",
"typeOfWorkId": "21x1140fa",
"timezone": "America/Los_Angeles",
"breakDuration": 0,
"duration": 4200
}
The awork gui will show the entry in the timeslot with the given local time but my user settings showing Europe/Berlin
and that would indicate that the entry would be shown in the slot 19:00
and 20:10
. Was it a design decision that awork will show the local time of entry without calculate the difference?