Jump to content


LZ Time Zone Wrong Constantly

timezone server time time liveZilla time WHM Timezone

10 replies to this topic

#1 Granwille

    Member

  • Members
  • PipPip
  • 25 posts
  • LocationNamibia

Posted 30 October 2017 - 12:46 PM

Hi,

We have a free LZ account and it appears that the timezone for LZ never seems to work. Have two scenarios which both seems to fail:

1. I set the time zone in the LZ server settings as "User server system timezone" in within our WHM server the time zone is set 100% correct as all other applications we use sync with the server time. See capture 1 and capture 3. However LZ decides to give it another timezone and not sync with the server time and gives me a timezone of +00.00 which is wrong.

So problem one is that LZ does not read the server time accurately when I set that setting.

2. So then I decide to change the Timezone within LZ to the one LZ provides and I select "Europe/Minsk +2.00" timezone because this is our timezone we run on. See capture 4. How LZ decides to not work again and autmatically sets me an hour late and gives me a time zone of +3.00 and not +2.00 when I select t "Europe/Minsk +2.00", see capture 5

In short, when I use the timezone that are encoded in the LZ setup it does not work puts me on an hour later than I am supposed to be. I selected a +2 timezone but it puts me in a +3 timezone which I did not select.

Please assist, yes I also updated to the latest LZ 7.0.8.5 hoping it would fix the problem but it did not. I have support times scheduled for our staff members and they are all one hour late or too early. Please assist!

Attached Thumbnails

  • Attached Image: Capture.PNG
  • Attached Image: Capture.PNG
  • Attached Image: Capture2.PNG
  • Attached Image: Capture3.PNG
  • Attached Image: Capture4.PNG
  • Attached Image: Capture5.PNG


#2 Granwille

    Member

  • Members
  • PipPip
  • 25 posts
  • LocationNamibia

Posted 01 November 2017 - 11:09 AM

So no one is going to assist me? Can someone please at least tell me where I can find the PHP timezone code within the php files? I looked in the 'server.php' file and it does not seem to be there?

#3 Patrick Keil

    Administrator

  • Administrators
  • 3564 posts
  • LocationSingen, Germany

Posted 02 November 2017 - 09:33 AM

Hi,

LiveZilla doesn't "decide" anything. It uses the default timezone configured or adjusts the timezoneif your server configuration allows that.

If you have a "one hour off" issue, can it be related to daylight saving time (DST)?

#4 Patrick Keil

    Administrator

  • Administrators
  • 3564 posts
  • LocationSingen, Germany

Posted 02 November 2017 - 09:38 AM

The related functions are located in _lib/objects.global.inc.php

Line 34x GetSystemTimezone

Line 40x SetSystemTimezone

Feel free to explain what's wrong with our approach.

#5 Granwille

    Member

  • Members
  • PipPip
  • 25 posts
  • LocationNamibia

Posted 02 November 2017 - 10:07 AM

Hi,

Thanks for the update, not its not day light saving time. Please explain to me if I take timezone "Europe/Minsk +2.00" it ends up giving me +3.00 time? Why? Its supposed to give me +2.00 and not one hour extra? This only happens with "Europe/Minsk +2.00" timezone and not the others?

Also explain that If I set it to "server timezone" Livezilla gives me a time timezone of 0.00 while my sever is set on a +2.00 timezone. And all other applications I use on this server like WHMCS the time is correct.

Surely there must be something wrong with livezilla?


#6 Granwille

    Member

  • Members
  • PipPip
  • 25 posts
  • LocationNamibia

Posted 02 November 2017 - 10:09 AM

Then I was looking for the file so that I can manually set a timezone myself within the code. Please do let me know if you advice this approach or any other solution?

#7 Patrick Keil

    Administrator

  • Administrators
  • 3564 posts
  • LocationSingen, Germany

Posted 02 November 2017 - 10:29 AM

Hi,

Thanks for the clarification.

Quote

Also explain that If I set it to "server timezone" Livezilla gives me a time timezone of 0.00 while my sever is set on a +2.00 timezone.
Most likely because your timezone is not included in the short list we use. There are way more (redundant) timezones. That however should not affect functionality. Can you explain what's not working when you set it to default? The server page shows a wrong date, anything else?

#8 Granwille

    Member

  • Members
  • PipPip
  • 25 posts
  • LocationNamibia

Posted 02 November 2017 - 10:36 AM

Hi,

Let me explain step by step:

1. I go into LZ server settings and set my timezone to: "Europe/Minsk +2.00".
2. When I check my LZ server page : chat.namhost.com it shows my timezone is set to +3.00.
3. But in step one I selected an option for a timezone of +2 yet LZ gives me a +3 timezone


Then I try another method:

1. I go into LZ server settings and set my timezone to: "Server Timezone"
2. When I check my LZ server page : chat.namhost.com it shows my timezone is set to 0.00
3. But in step one I set it to server timezone which means its supposed to use the timestamp that my server uses. And my server uses a timezone of +2
4. But this is not the case if I follow this method my LZ is 3 hours behind. Yet all other applications that I use like WHMCS is also set to use "server time" have the correct timestamp.

#9 Patrick Keil

    Administrator

  • Administrators
  • 3564 posts
  • LocationSingen, Germany

Posted 02 November 2017 - 11:01 AM

Hi,

Thanks for the details.

The problem turned out to be "Minsk" which is in fact +3 and not +2. We will correct that for the next update 7.0.8.6.

You can workaround this by disabling the "SetSystemTimezone" function.

The file is _lib/objects.global.inc.php

Change this:
    static function SetSystemTimezone()
    {
	    if(function_exists("date_default_timezone_set"))
	    {

into this:

    static function SetSystemTimezone()
    {
	    return false;
	    if(function_exists("date_default_timezone_set"))
	    {

That will run everything in webservers default timezone which is obvioulsy correct.

Hope that works.

#10 Granwille

    Member

  • Members
  • PipPip
  • 25 posts
  • LocationNamibia

Posted 02 November 2017 - 11:24 AM

Hi,

No that will not work, now it will not set any timezone and use my default server time. LZ does not read my servers time correct either as I mentioned in my second method?

#11 Granwille

    Member

  • Members
  • PipPip
  • 25 posts
  • LocationNamibia

Posted 02 November 2017 - 11:47 AM

I am trying to force the timezone in the get function.

At the bottom of the function I did this:

//return $index[0];
return array('Africa/Johannesburg' => 2.00);

or

return 'Africa/Johannesburg';

But none worked. Can you please let me know how I can force a timezone please?





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users