Skip to content
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

T2R should respect Locale of Red'User or_else Red'Server or_else BrowserClient #75

Open
tonischilling opened this issue Oct 4, 2021 · 6 comments
Assignees
Labels
bug Something isn't working

Comments

@tonischilling
Copy link

Bug summary
When using T2R from Germany and picking a date in the DatePicker (or just use the current date),
it will be transformed to the _date of the previous day,
giving a wrong search interval for the Redmine-TimeEntries.

To Reproduce

  1. choose Timezone Germany in your Redmine-Account
  2. produce some Activities on some consecutive days (e.g October 4,3,2,1),
    Steps to reproduce the behavior:
  3. Go to '...'
  4. Click on '....'
  5. Scroll down to '....'
  6. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Device information

  • Type: [e.g. Desktop / Laptop / Handheld]
  • OS: [e.g. Windows 10 / Ubuntu 18.4 / MacOS 10.14.4]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

@tonischilling tonischilling added the bug Something isn't working label Oct 4, 2021
@tonischilling
Copy link
Author

Hrrrg! Sorry, somehow I hit [save], before I finished the description.

@tonischilling
Copy link
Author

Description continued ...

Steps to reproduce
3. add comments to these activities (2./3./4.Okt),
telling the date (:spent_on) of the activity: e.g. "am 2/3/4.Oktober"
4. choose 4.Okt.2021 in T2R-DatePicker
Table "Time-Logged-In-Redmine" will show "am 3.Oktober"

Expected result:
Table "Time-Logged-In-Redmine" should show "am 4.Oktober"

@tonischilling
Copy link
Author

I hacked this into t2r.js to find the reason:
image

@tonischilling
Copy link
Author

I got this in the Developer-Console:
image
Internally the time part of the ISO-string will be cut off and replaced by "00:00:00Z",
giving us the previous day when fetching the Redmine entries.

@tonischilling
Copy link
Author

my suggestion:
Instead of dealing with the User-Locale on browser-side,
it would be better, to send the picked date "as is" to the Rails-Action.
On Rails-side the users | redmines |servers locale is well known, ...

@tonischilling
Copy link
Author

Context:

  • using Toggl2Redmine-4.3.1, Redmine-4.2.2, Rails-5.2.6, Ruby-2.7.4
  • I used different browsers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants