tomolimo / timezones

GLPI plugin that provides time zone management
4 stars 3 forks source link

Timezone individual #23

Closed zezao123 closed 5 years ago

zezao123 commented 5 years ago

Hi tomolimo, really great work here, but i have a doubt and dont know if its really a bug.

Example: A company worldwide has officers in EUA, China and Brazil and want to every office work on your GMT time, so on your plugin user should just select your GMT on header and everything work as should but isnt working that way,

When both log on system show the server default GMT and users change to your gmt but when user on China change to GMT +8 the time change to Brazil tech too and when Brazil tech change on China change too, like all times are showing with gmt +8 and not only tickets that user open, theres a way to make GMT for each user individually? I dont know if u understand my doubt and really sorry for bad english but i have a demand to solve that and dont know if i can.

tomolimo commented 5 years ago

Hello @zezao123 As far as I understand your need: you need to open a ticket (or any object) within the same timezone (let's say UTC+0 for example) from everywhere in the world? If this this your need, then you don't need to use timezones plugin as this plugin is made for showing objects in local timezone... Correct me if I didn't catch your need, Regards, Tomolimo

zezao123 commented 5 years ago

No @tomolimo i will show a example:

User in California (GMT -7) open a ticket In that company tech are worldwide so lets suppose a tech in Brazil accept that ticket who was open on another country. Tech in Brazil accept that ticket (GMT -3 Brazil) What i want and need is to keep the time who user in california open that ticket, lets suppose was 04:24 AM but in brazil is 08:26 AM User (California): My computer has ....... (04:24 AM - this is the time when he open the ticket) Tech add a task on same time on ticket: fixed (08:28 AM - this is the time when he write the task)

Today GLPI and timezones changes the timezone for everyone in GLPI until he logout, what im trying to say and do is to make a timezone for every user, like i live on Brazil and u on Russia (idk) we have different GMT but GLPI cant handle that yet

Here a img: http://prntscr.com/p3qrsh

tomolimo commented 5 years ago

Hello @zezao123, I try to understand, let me rephrase your need. During a ticket lifecycle, you want to keep the TZ (timezone) of where the ticket has been open? And such you want to assign a TZ to the tickets and not to the users? Or let's say that TZ of ticket is linked to TZ of requester of ticket? Is that your real need? Regards, Tomolimo

zezao123 commented 5 years ago

Hello @zezao123, I try to understand, let me rephrase your need. During a ticket lifecycle, you want to keep the TZ (timezone) of where the ticket has been open? And such you want to assign a TZ to the tickets and not to the users? Or let's say that TZ of ticket is linked to TZ of requester of ticket? Is that your real need? Regards, Tomolimo

Yes, keep the TZ time where the ticket was open, when user select the TZ that need to be bound to the user, like, when he dc from glpi and login again stay in the tz he has selected.

zezao123 commented 5 years ago

Create 2 user, on user 1 put any TZ save and logout... log on second user choose any other TZ and save, log again to first user and the TZ will be the TZ who second user select

tomolimo commented 5 years ago

Hello @zezao123

Create 2 user, on user 1 put any TZ save and logout... log on second user choose any other TZ and save, log again to first user and the TZ will be the TZ who second user select

Is this a use case of expected result or is it a new issue? Please do not mix issues, otherwise, it's impossible to answer.

Thank you Tomolimo

zezao123 commented 5 years ago

Hello @zezao123

Create 2 user, on user 1 put any TZ save and logout... log on second user choose any other TZ and save, log again to first user and the TZ will be the TZ who second user select

Is this a use case of expected result or is it a new issue? Please do not mix issues, otherwise, it's impossible to answer.

Thank you Tomolimo

Its a follow guide to try to explain the problem, but ive answered here:

Yes, keep the TZ time where the ticket was open, when user select the TZ that need to be bound to the user, like, when he dc from glpi and login again stay in the tz he has selected.

This i think will solve the problem

tomolimo commented 5 years ago

Hello @zezao123 The principle of the timezone plugin is to permit a user to set his/her TZ, and to keep it after logout/login. But it is not to assign a TZ to a ticket... The goal is that the user will see any datetime in his/her own TZ, and not in the TZ of someone else. Thank you Regards, Tomolimo

zezao123 commented 5 years ago

The principle of the timezone plugin is to permit a user to set his/her TZ, and to keep it after logout/login.

But this isnt working... Will try to example this:

User A who lives in Brazil set a timezone for GMT -3 User A disconnect User B who lives in Shanghai login and change time to GMT -8 User A connect again and them the timezone has changed to GMT -8, doenst keep GMT -3

I will try to make a video soon if u dont understand

Edit: im using glpi 9.4.3 and timezone 2.5.1

tomolimo commented 5 years ago

Hello @zezao123 Could you provide logs from /files/_log folder? Thank you, Regards, Tomolimo

zezao123 commented 5 years ago

Sure

php-errors.log sql-errors.log

tomolimo commented 5 years ago

Hello @zezao123 I found the bug, thank you for your report. There is a bug in the installation procedure... Could you try to replace the hook.php file with the one I posted below? hook.zip Then uninstall the plugin, and start again installation + enabling. Thank you, Regards, Tomolimo