Jump to content
  • 0
Foob

Web Flux & Vote For Points - Time is not matching

Question

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

Share this post


Link to post
Share on other sites

3 answers to this question

Recommended Posts

  • 0
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.

Share this post


Link to post
Share on other sites
  • 0
2 hours ago, 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.

Share this post


Link to post
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...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.