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

Time Issue in ticket request #433

Open
1 of 2 tasks
sokeada opened this issue Aug 23, 2021 · 14 comments
Open
1 of 2 tasks

Time Issue in ticket request #433

sokeada opened this issue Aug 23, 2021 · 14 comments
Labels

Comments

@sokeada
Copy link

sokeada commented Aug 23, 2021

Is this a BUG REPORT or FEATURE REQUEST?:

  • BUG
  • FEATURE

What happened:
Time when submit and time when agent comment in ticket request is different from time-zone

What did you expect to happen:
Time should be display correctly with time-zone that have been set in time-zone setting

Environment:

  • Trudesk Version: 1.1.8
  • OS (e.g. from /etc/os-release): Ubuntu 16.04.7 LTS
  • Node.JS Version: 12.18.3
  • MongoDB Version: 3.6
  • Is this hosted on cloud.trudesk.io: No

trudesk time issue

@polonel
Copy link
Owner

polonel commented Aug 25, 2021

Did you restart the trudesk server after making the time zone change? This setting is applied during startup.

@sokeada
Copy link
Author

sokeada commented Aug 25, 2021

I did restarted the server, bro. Before I start installing via script, my time zone has been changed to +7 Asia/Phnom_Penh already.

@polonel
Copy link
Owner

polonel commented Aug 25, 2021

Enable Debug mode by setting NODE_ENV=development

When you boot up trudesk. In the server log, does it show the correct time zone?

8/25 12:07:42 [28968] - info:     .                              .o8                     oooo
8/25 12:07:42 [28968] - info:   .o8                             "888                     `888
8/25 12:07:42 [28968] - info: .o888oo oooo d8b oooo  oooo   .oooo888   .ooooo.   .oooo.o  888  oooo
8/25 12:07:42 [28968] - info:   888   `888""8P `888  `888  d88' `888  d88' `88b d88(  "8  888 .8P'
8/25 12:07:42 [28968] - info:   888    888      888   888  888   888  888ooo888 `"Y88b.   888888.
8/25 12:07:42 [28968] - info:   888 .  888      888   888  888   888  888    .o o.  )88b  888 `88b.
8/25 12:07:42 [28968] - info:   "888" d888b     `V88V"V8P' `Y8bod88P" `Y8bod8P' 8""888P' o888o o888o
8/25 12:07:42 [28968] - info: ==========================================================================
8/25 12:07:42 [28968] - info: trudesk v1.1.8 Copyright (C) 2014-2021 Chris Brame
8/25 12:07:42 [28968] - info:
8/25 12:07:42 [28968] - info: Running in: development
8/25 12:07:42 [28968] - info: Server Time: Wed Aug 25 2021 12:07:42 GMT-0400 (Eastern Daylight Time)
8/25 12:07:43 [28968] - info: Connected to MongoDB
8/25 12:07:45 [28968] - debug: Checking Default Settings...
8/25 12:07:45 [28968] - debug: MongoDB version 3.6 detected.
8/25 12:07:45 [28968] - debug: Timezone set to America/New_York
8/25 12:07:45 [28968] - debug: Registering Permissions...
8/25 12:07:45 [28968] - info: SocketServer Running
8/25 12:07:45 [28968] - debug: Building dynamic sass...
8/25 12:07:46 [28968] - info: TruDesk is now listening on port: 8118
8/25 12:07:46 [28968] - info: trudesk Ready

@sokeada
Copy link
Author

sokeada commented Aug 26, 2021

thanks for your tip bro. By the way, I am new to nodejs, would you mind to point me out where I could enable the debug mode and which server log name I should check to get information like yours?

@polonel
Copy link
Owner

polonel commented Aug 26, 2021

Run export NODE_ENV=development on your prompt. Then start/restart trduesk

If you used the installs script. you can get the logs via running pm2 logs trudesk

@sokeada
Copy link
Author

sokeada commented Aug 26, 2021

thanks for pointing me out to the right location, bro. Here is the log, looks like the time zone is correct, I am using GMT +07 Asia/Phnom_Penh but in web interface shows differently.
truedesk timezone

@sokeada
Copy link
Author

sokeada commented Aug 30, 2021

I tried to enable debug mode using your instruction but i still can't get debug mode as yours. :(

@polonel
Copy link
Owner

polonel commented Aug 30, 2021

The quickest way is to stop trudesk with pm2.

Then run NODE_ENV=development && node app.js

@sokeada
Copy link
Author

sokeada commented Aug 31, 2021

thanks for the tips once again, bro. here is the result.

image

@stale
Copy link

stale bot commented Jan 9, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Jan 9, 2022
@f0regen
Copy link

f0regen commented Apr 11, 2022

This still needs a fix

@stale stale bot removed the wontfix label Apr 11, 2022
@stale
Copy link

stale bot commented Apr 27, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Apr 27, 2022
@polonel polonel added backlog and removed wontfix labels Apr 27, 2022
@rickyprat
Copy link
Contributor

rickyprat commented Jul 5, 2022

This is still an issue in v1.2.3
Dashboard = OK
Messages = Partially OK
/tickets = Not OK

I posted here before:
https://forum.trudesk.io/t/wrong-timezone-still-back-to-the-default-of-5/885

Tried modifying some filed by changing default time zone to my area but didn't work, seems like there are some .js files that's affecting the time zone (3.js).

However, time displayed correctly on the mobile version. Took a few screenshot last week:

Mobile v1 2 3 Ticket General

Mobile v1 2 3 Ticket Specific

Mobile v1 2 3 Ticket Details

@rickyprat
Copy link
Contributor

rickyprat commented Jul 15, 2022

3.js sets cookie to the default of America/New_York. Found a workaround, change the first entry of "America/New_York" to the local timezone in ~/trudesk/public/js/3.js, this works for me in linux debian (Trudesk v1.2.3 and v1.2.4):

sed -i 's/"America\/New_York"/"Asia\/Jakarta"/' /usr/src/trudesk/public/js/3.js

Another example if your timezone is Asia/Phnom_Penh:

sed -i 's/"America\/New_York"/"Asia\/Phnom_Penh"/' /usr/src/trudesk/public/js/3.js

If Trudesk is running on docker container, do this first:

docker exec -it <container_name> bash

Then execute the sed command above. Afterwards, just refresh the web browser or open a new tab of Trudesk dashboard.

Update: The file is 4.js on Trudesk v1.2.5

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

No branches or pull requests

4 participants