OpenCATS icon indicating copy to clipboard operation
OpenCATS copied to clipboard

Cannot see Indian Time Zone.

Open GautamArya opened this issue 9 years ago • 17 comments

While I was running through installation wizard, can't see Indian Time Zone in the list. It should be there. there is no option for GMT +530

Time zone Refs: http://www.timeanddate.com/time/zone/india/new-delhi http://www.timeanddate.com/time/zones/ist

GautamArya avatar Jul 01 '16 07:07 GautamArya

was this 0.9.1a or 0.9.2?


Russ

On 1 July 2016 at 08:35, GautamDhedhi [email protected] wrote:

While I was running through installation wizard, can't see Indian Time Zone in the list. It should be there. there is no option for GMT +530

Time zone Refs: http://www.timeanddate.com/time/zone/india/new-delhi http://www.timeanddate.com/time/zones/ist

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/opencats/OpenCATS/issues/77, or mute the thread https://github.com/notifications/unsubscribe/AARQfPeJSzJr6gTFWL3Jtnv4N9y0StyZks5qRMNEgaJpZM4JC5Dk .

RussH avatar Jul 01 '16 09:07 RussH

I am using Version 0.9.2 Diablo

GautamArya avatar Jul 01 '16 10:07 GautamArya

Currently the app does not support fractional GMT offsets - and GMT + 5:30 time is commented out. ..from https://github.com/opencats/OpenCATS/blob/master/constants.php

/* Time Zones */ // FIXME: Support fractional GMT offsets.

//array(5.5, 'GMT+05:30 Chennai, Kolkata, Mumbai, New Delhi'), //array(5.5, 'GMT+05:30 Sri Jayawardenepura'),


Russ

On 1 July 2016 at 11:08, GautamDhedhi [email protected] wrote:

I am using Version 0.9.2 Diablo

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/opencats/OpenCATS/issues/77#issuecomment-229910280, or mute the thread https://github.com/notifications/unsubscribe/AARQfAzW2PnBO7CXoXM8uW3GFuSlXUjCks5qROcvgaJpZM4JC5Dk .

RussH avatar Jul 01 '16 10:07 RussH

Any updates on this please...

Got this by uncommenting the India time zone in constants.php

KamalJoshiDelhi avatar Sep 18 '16 05:09 KamalJoshiDelhi

Hi @KamalJoshiDelhi did it all work once you'd uncommented it? If so, I can uncomment it in the Master.

RussH avatar Nov 23 '16 17:11 RussH

On uncommenting India's timezone the timezone (GMT +05:30 Chennai, Kolkata, Mumbai, New Delhi) is available in the drop down list in Localozation settings... However when I try to save and logout and come back to localization settings it shows me that I am from GMT +05:00 Ekaterinburg timezone... So I guess it does not work yet... It is NOT SHOWING India's timeline when GMT +05:30 is selected...

KamalJoshiDelhi avatar Nov 24 '16 08:11 KamalJoshiDelhi

Hi RussH, I just now noticed that even though in my localization when I select GMT +06:00 Almaty, Novosibirsk timezone (I thought it would be okay for me to see the entries in my ATS may be 30 minutes ahead of the local time in Indian timezone) all the entries in ATS are still reflecting the time in GMT and not in the local time of the timezone selected.... This is Just FYI... Just in case it tells you something about the code that needs to be incorporated in ATS regarding this... Regards Kamal Joshi

KamalJoshiDelhi avatar Nov 25 '16 08:11 KamalJoshiDelhi

Hi Kamal, can you try this please? - as I posted into the forums for a similar query; There was a change in PHP which required the php timezone to be set. if you have access to your server's php.ini, please can you check if this corrects the issue.

Code: Select all You probably need to put the timezone in a configuration line in your php.ini file. You should have a block like this in your php.ini file:

[Date]
; Defines the default timezone used by the date functions
; http://php.net/date.timezone
date.timezone = America/New_York

where the available timezones are listed here; http://php.net/manual/en/timezones.indian.php

Afterwards, please stop and restart your apache server. After this, your php timezone should be 'localised'.. If this fixes your issue, we can look to incorporate it into the opencats code.

RussH avatar Nov 25 '16 09:11 RussH

I could not locate php.ini on my server and when I tried speaking to the tech support of my service provider they told me the following 2 things:

  1. " in filemanager inside cpanel you need to createa php.ini file there you need to add the timezone"
  2. When asked about stop and restarting of apache server they responded: "that need not be done"

Now my question is which directory shall I create this php.ini file and do i need to put the code related to timezone only in that ini file... I don't know if this tech person from my service provider has got me wrong...

KamalJoshiDelhi avatar Nov 25 '16 16:11 KamalJoshiDelhi

Really?

You should find one in

/etc/php Or /etc/php5

On November 25, 2016 11:54:12 AM EST, Kamal Joshi [email protected] wrote:

I could not locate php.ini on my server and when I tried speaking to the tech support of my service provider they told me the following 2 things:

  1. " in filemanager inside cpanel you need to createa php.ini file there you need to add the timezone"
  2. When asked about stop and restarting of apache server they responded: "that need not be done"

Now my question is which directory shall I create this php.ini file and do i need to put the code related to timezone only in that ini file... I don't know if this tech person from my service provider has got me wrong...

-- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/opencats/OpenCATS/issues/77#issuecomment-262996711

amaisonneuve avatar Nov 25 '16 20:11 amaisonneuve

If your on windows it should be in c:/windows

On November 25, 2016 11:54:12 AM EST, Kamal Joshi [email protected] wrote:

I could not locate php.ini on my server and when I tried speaking to the tech support of my service provider they told me the following 2 things:

  1. " in filemanager inside cpanel you need to createa php.ini file there you need to add the timezone"
  2. When asked about stop and restarting of apache server they responded: "that need not be done"

Now my question is which directory shall I create this php.ini file and do i need to put the code related to timezone only in that ini file... I don't know if this tech person from my service provider has got me wrong...

-- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/opencats/OpenCATS/issues/77#issuecomment-262996711

amaisonneuve avatar Nov 25 '16 20:11 amaisonneuve

Well I got a new message from my service provider which says: "Hello,

I would like to inform you that our server has Cloudlinux installed due to which if you will upload custom php.ini for an account it will break the CloudLinux functionality, so there would not be any php.ini file present under web root directory of the domain.

As mentioned in the previous mail, you can perform the below given steps to edit the php parameters.

  1. login to cPanel
  2. select php version
  3. got to Switch To PHP Settings refer:- http://prntscr.com/bkluu4
  4. choose the parameter and edit the setting that is required http://prnt.sc/dbo0oa
  5. click on Apply tab

" So what I did was tried changing the value of date.timezone function to Asia/Kolkata and checked if ATS was giving the right time after that... unfortunately it is still not giving me the correct time... it keeps changing me to GMT +05:00 Ekaterinburg timezone even though I try to save GMT +05:30 Chennai, Kolkata, Mumbai, New Delhi

KamalJoshiDelhi avatar Nov 26 '16 07:11 KamalJoshiDelhi

PRnt Screen of what I changed: image

KamalJoshiDelhi avatar Nov 26 '16 07:11 KamalJoshiDelhi

Time shown in my ATS is now + 6.5 hrs Indian Standard Time -1:00 HR GMT....

image

KamalJoshiDelhi avatar Nov 26 '16 08:11 KamalJoshiDelhi

AFAIK, the Indian time zones will not work even if you uncomment the constants.php. This problem is more severe when you have applications on different timezone on single server.

Currently the timezone saved in the database using a convoluted manner (this was an issue with the original cognizo version). I think the only workaround is to rewrite the whole timezone calculation stuff and use Unix timestamp instead of the datetime data. The idea is to store all the datetime data in Unix timstamp (GMT) and then convert it using an utility by offsetting the timezone setting for the application.

However, this is not an easy task as we will have to deal with the existing data. In addition, converting the existing datetime values with TZ might cause data integrity.

libregeek avatar Nov 28 '16 06:11 libregeek

Is this issue fixed?

pras2309 avatar Oct 06 '18 06:10 pras2309

Hi guys, fairly certain I had a solution to this as we have users in India etc. Will have to double check how we achieved it as was a little while ago now.

Think we stored everything in the database as one main timezone i.e. GMT, then gave each user their own Timezone as a float and displayed all times/dates throughout the system (incl. notifications) to respect their chosen timezone.

So the user sees everything on their timezone (even though the data is stored in GMT).

dveos avatar Mar 13 '19 13:03 dveos