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

Error 500 : create time sheet from calendar view #1032

Closed
cm22608 opened this issue Aug 14, 2019 · 7 comments
Closed

Error 500 : create time sheet from calendar view #1032

cm22608 opened this issue Aug 14, 2019 · 7 comments
Labels

Comments

@cm22608
Copy link

cm22608 commented Aug 14, 2019

Describe the bug
I receive an http 500 error when creating a timesheet entry from the calendar view
Request failing : http://localhost:8080/en/timesheet/create?from=2019-08-14T05:30:00Z&to=2019-08-14T06:30:00Z

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'Calendar View'
  2. Select Day button
  3. Select a timeframe with the mouse button
  4. See error

Logfile
[2019-08-14 08:47:28] request.CRITICAL: Uncaught PHP Exception IntlException: "datefmt_create: time zone id 'Z' extracted from ext/date DateTimeZone not recognized: U_ILLEGAL_ARGUMENT_ERROR" at /var/www/html/kimai2/vendor/symfony/form/Extension/Core/DataTransformer/DateTimeToLocalizedStringTransformer.php line 170 {"exception":"[object] (IntlException(code: 1): datefmt_create: time zone id 'Z' extracted from ext/date DateTimeZone not recognized: U_ILLEGAL_ARGUMENT_ERROR at /var/www/html/kimai2/vendor/symfony/form/Extension/Core/DataTransformer/DateTimeToLocalizedStringTransformer.php:170)"} []

Environment :
CentOS Linux release 7.6.1810 (Core)
PHP 7.2.21 (cli) (built: Jul 30 2019 14:46:08) ( NTS )
mysql Ver 14.14 Distrib 5.6.45, for Linux (x86_64) using EditLine wrapper
Kimai 2 - 1.1 stable (Ayumi) by Kevin Papst and contributors.

@kevinpapst
Copy link
Member

Try:

  • to set the timezone of your user account in your preferences
  • to set date_timezone in your php.ini
  • check your OS locales
  • check for available updates of your ICU system packages and the PHP Intl extension

I found this here: humhub/humhub#2846

@cm22608
Copy link
Author

cm22608 commented Aug 14, 2019

Hello,
The culprit is the default timezone set to "UTC" for the user.
If I change from UTC to Europe/whatever, it works.
Thanks for the feedback, ticket can be closed

@cm22608 cm22608 closed this as completed Aug 14, 2019
@kevinpapst
Copy link
Member

By setting a timezone you are just "hiding" a problem with something else in your system/environment. This error indicates that something is wrong with (I guess) your ICU database.
But thats not a Kimai issue, so yes closing is my favorite as well ;-)

Oh and you can set a default timezone for new users in Administration/Settings.

@cm22608
Copy link
Author

cm22608 commented Aug 14, 2019

My OS locales looks fine : [root@localhost ~]# locale
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

Tried to change date.timezone in php.ini but with no luck

ICU version looks also fine :
root@localhost ~]# php -i |grep -i icu
ICU version => 62.1
ICU Data version => 62.1
ICU TZData version => 2018e
ICU Unicode version => 11.0

I'll take the option of default timezone for new users in Administration/Settings.
Thanks !

@kevinpapst
Copy link
Member

I dno't know much about the ICU system. Found those on my servers:

ICU version => 64.2
ICU Data version => 64.2
ICU TZData version => 2019a
ICU Unicode version => 12.1
ICU version => 64.1
ICU Data version => 64.1
ICU TZData version => 2018i
ICU Unicode version => 12.0

But as long as it works with a "real" timezone instead of Zulu, I think you can ignore the problem.

@lock
Copy link

lock bot commented Oct 13, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. If you use Kimai on a daily basis, please consider donating to support further development of Kimai.

@lock lock bot locked and limited conversation to collaborators Oct 13, 2019
@kevinpapst
Copy link
Member

BTW: this seems to be a bug in Symfony. I was wrong with my assumption above about the ICU database.
See symfony/symfony#33901

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants