Jump to content
  • 0

Web Flux & Vote For Points - Time is not matching


Foob

Question


  • Group:  Members
  • Topic Count:  46
  • Topics Per Day:  0.02
  • Content Count:  267
  • Reputation:   40
  • Joined:  01/19/17
  • Last Seen:  

Hi,

I'm having a difficulty setting the correct time for the vote for points and fluxcp. I have currently configured this application.php

'DateDefaultTimezone'		=> 'Asia/Singapore',

However, my web-host server (shared hosting) is currently in UTC.

The problem is that whenever I use VoteForPoints in the logs (database) it shows correct time (GMT+8 format).

However, when the time already passed (timestamp_expire) is greater than the Singapore time I still can't vote. (Normally you should be able to vote).

I found the problem where the shared hosting time which is in UTC is being used by the VPS.

So if I set the interval for every vote to 8 hours, it will automatically add additional 8 hours since UTC is 00:00 while SGT is +08:00.

What I already did:

  • Force timezone via PHP Configuration to Asia/Singapore
    - via SO answer
  • In application.php its also Asia/Singapore
    - Fluxcp default timezone config

I've tried to google it but can't find any or I'm misreading something.

P.S. I asked here in 3rd party support since the V4P is not a default flux function. If I'm wrong kindly move to proper forum.

Edited by Foob
Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  46
  • Topics Per Day:  0.02
  • Content Count:  267
  • Reputation:   40
  • Joined:  01/19/17
  • Last Seen:  

On 5/2/2021 at 11:51 AM, Chaos92 said:

You can set your php timezone in php.ini file in your web hosting.

date.timezone = "Asia/Singapore"

If VPS, you can try follow this : https://hostingmalaya.com/cara-menukar-timezone-vps-atau-server-linux.

I have did this already via php.ini and or via .htaccess setting date.timezone it still doesn't work.

When V4P checks the time it still uses VPS Shared Hosting date which is in UTC. And to add, I cannot change the time of it since its a shared hosting.

Fixed. Need to update SQL timezone.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  49
  • Topics Per Day:  0.01
  • Content Count:  1509
  • Reputation:   227
  • Joined:  08/03/12
  • Last Seen:  

9 hours ago, Foob said:

Hi,

I'm having a difficulty setting the correct time for the vote for points and fluxcp. I have currently configured this application.php


'DateDefaultTimezone'		=> 'Asia/Singapore',

However, my web-host server (shared hosting) is currently in UTC.

The problem is that whenever I use VoteForPoints in the logs (database) it shows correct time (GMT+8 format).

However, when the time already passed (timestamp_expire) is greater than the Singapore time I still can't vote. (Normally you should be able to vote).

I found the problem where the shared hosting time which is in UTC is being used by the VPS.

So if I set the interval for every vote to 8 hours, it will automatically add additional 8 hours since UTC is 00:00 while SGT is +08:00.

What I already did:

  • Force timezone via PHP Configuration to Asia/Singapore
    - via SO answer
  • In application.php its also Asia/Singapore
    - Fluxcp default timezone config

I've tried to google it but can't find any or I'm misreading something.

P.S. I asked here in 3rd party support since the V4P is not a default flux function. If I'm wrong kindly move to proper forum.

You can set your php timezone in php.ini file in your web hosting.

date.timezone = "Asia/Singapore"

If VPS, you can try follow this : https://hostingmalaya.com/cara-menukar-timezone-vps-atau-server-linux.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...