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

Wrong hours (+1) #6

Closed
kubehu opened this issue Oct 31, 2019 · 23 comments
Closed

Wrong hours (+1) #6

kubehu opened this issue Oct 31, 2019 · 23 comments

Comments

@kubehu
Copy link

kubehu commented Oct 31, 2019

Current time: 14:51
I set the date and time to 14:59:00, and the counter value is: 01:07:59.
That's an hour more.

When you wait until the time is less than 1 hour, open the page with countdown and the seconds digit will be freeze.

@baden03
Copy link
Owner

baden03 commented Nov 1, 2019

two possibilities:
First, check your WordPress timezone settings to make sure that the system time matches your local time.

Second, check if you are using a caching plugin, as caching is a snapshot of the page at a specific time, and not created anew each time it's being requested..

@kubehu
Copy link
Author

kubehu commented Nov 1, 2019

  • I checked the time, server is ok (CET), wp is ok (UTC+1)
  • I don't use cache plugin.
  • When I'm changing the wp time zone (to plus or minus 1 hour), the countdown time is still remains the same (browser cache flush, site modified and publish for safety's sake.)

@kubehu
Copy link
Author

kubehu commented Nov 1, 2019

Update:
I tested another website (other server). The result is the same as before.

@baden03
Copy link
Owner

baden03 commented Nov 2, 2019

Can you provide a link to either of the examples?

@kubehu
Copy link
Author

kubehu commented Nov 2, 2019

Yes of course @baden03. I created a test post with 03-11-2019 23:00:00:
http://gvm.kube.hu/2018/12/19/hello-vilag/

@kubehu
Copy link
Author

kubehu commented Nov 2, 2019

This code is correct with local time and target date in source:

jQuery(document).ready(function($) {
$('#new-years-eve-dashboard').tminusCountDown({
targetDate: {
'day': 	05,
'month': 11,
'year': 2019,
'hour': 23,
'min': 	00,
'sec': 	00,
'localtime': '11/5/2019 10:00:14'
},
style: 'jedi',
id: 'new-years-eve',
event_id: '',
launchtarget: 'countdown',
omitWeeks: 'false',
omitmonths: 'false',
omityears: 'false'});
});

On frontend time is one hour more.

@baden03
Copy link
Owner

baden03 commented Nov 6, 2019

are you using a shortcode or the T(-) Countdown block?

@kubehu
Copy link
Author

kubehu commented Nov 6, 2019

@baden03 I'm using a shortcode. I updated the date to 11/7/2019 23:00:00.

@baden03
Copy link
Owner

baden03 commented Nov 6, 2019

@zerx please share the exact code so we can test it as well.
Also, you might want to explicitly set the timezone using the timezone attribute:
[tminus t="2019-11-09 23:00:00" timezone="Europe/Budapest" /]

If your WordPress timezone value is +1... this will not take into account daylight savings.. so you might want to set that to a proper PHP timezone value:
https://www.php.net/manual/en/timezones.php

@kubehu
Copy link
Author

kubehu commented Nov 6, 2019

@baden03
Ok, now I modified the code to yours. The problem is still alive.
So now the shortcode on the page is:
[tminus t="2019-11-09 23:00:00" timezone="Europe/Budapest" /]

@baden03
Copy link
Owner

baden03 commented Nov 6, 2019

this is very strange... and the current time that is displayed under dashboard > settings > timezone is correct?

@kubehu
Copy link
Author

kubehu commented Nov 6, 2019

@baden03
Yes, it's corret:
Universal time (UTC) is 2019-11-06 14:54:46. Local time is 2019-11-06 15:54:46.

By the way if changed the timezone in wordpress settings, the counter doesn't change.

I tired another site with under construction from theme feature function (the function has a countdown), it's works fine.
So I think there is a problem with the extension. it is possible?

@baden03
Copy link
Owner

baden03 commented Nov 6, 2019

if you set the timezone attribute, the counter will not change with WordPress... try removing the timezone attribute and then you can dial it in by changing the WP settings.

You might try turning off all plugins and seeing if you can find one that affects the timezone by turning them back on one-by-one...

Regardless, we'll get it figured out and resolved with you.

@kubehu
Copy link
Author

kubehu commented Nov 6, 2019

@baden03

I'm done with these options and their variations.

  • turned off all plugins
  • remove the attribute and change wp settings (it had never worked before)
  • deactivate/active and remove/install this plugin
  • hard flush my browser cache

It is very interesting that the counter does not change when I changed Wp time settings.
It wouldn't be a problem if I set the extension 1 hour earlier. However, in this case, the seconds counter will stop when it is within an hour.

@kubehu
Copy link
Author

kubehu commented Nov 9, 2019

@baden03

I found another plugin with +1 hour effect: Countdown Wpdevart
I have good counters (plugin, under constraction page in theme), but this plugin could help for us, cause They may have worked from the same source.

The time is central europe with winter time from october last sunday in Hungary. I think it will be the source of problem. I can't think of anything else.

@git-hela
Copy link

git-hela commented Jan 21, 2020

Same Situation here. Neither the timezone setting in WP nor the timezone attribute in the shortcode affects the counter.

Maybe the plugin (or WP) gets the time/timezone directly from the server and passes it to the counter?

http://www.hth-pyrotec.at

@baden03
Copy link
Owner

baden03 commented Jan 30, 2020

Working on resolving this issue today... stand by for an update.

@baden03
Copy link
Owner

baden03 commented Jan 30, 2020

Version 2.4.6d has just been pushed to the repo and it should resolve the timezone issue.

@baden03
Copy link
Owner

baden03 commented Jan 31, 2020

Issue marked as resolved.

@baden03 baden03 closed this as completed Jan 31, 2020
@kubehu
Copy link
Author

kubehu commented Jan 31, 2020

@baden03

I tested at now.

  • Widget: works fine, but number of seconds (and years,months,weeks display as sum of days ) not appear. So it's another problem.
  • Shortcode: does not work, [tminus t="2020-01-31 13:00:00" timezone="Europe/Budapest" /] -> 00:00:00

@baden03
Copy link
Owner

baden03 commented Jan 31, 2020

Widget? There is no sidebar widget anymore. Are you referring to the Gutenberg Block?
There is no timezone attribute, please remove this, only the timezone set in the WordPress Settings > General > Timezone is used. What is the exact value (and date/time) set under the WP Timezone settings?

We have tested this across a number of setups and have not seen an issue, so if you are continuing to experience the wrong time settings, please verify:

  1. Your timezone is set correct
  2. T(-) Countdown updated to the latest version
  3. Browser Cache is cleared and the page is loading fresh

@kubehu
Copy link
Author

kubehu commented Jan 31, 2020

Yes I refering to the Gutenberg Block. I installed a fresh new site with this plugin, I thought it would be the best. Now its ok. The sorthcode is works fine at now. This issue resolved.

@baden03
Copy link
Owner

baden03 commented Jan 31, 2020

Very happy to hear that! Thank you for the feedback, and patience while we solved this.

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

No branches or pull requests

3 participants