Support » Plugin: T(-) Countdown » Wrong calculation

  • Resolved Kai J.

    (@kjoussen)


    Hi there.

    I set the timezone in my WP correct to Berlin.

    I also set the timezone “Europe/Berlin” in the shortcode.

    But the countdown is still adding 2 hours to my event.

    Event date and time: May 29th 2020 13:30
    Checked on January 29th 2020 at 15:56

    Countdown says 120 days, 23 hours, 33 minutes.
    But it should be 21 hours.

    How can i fix this?

    Cheers

    Kai

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author twinpictures

    (@twinpictures)

    Hello Kai,

    Does Berlin observe Daylight savings time?
    That might account for ONE hour… but not two.
    Is the time shown in the timezone setting correct?
    If the server has the wrong time… well… you know.

    Hi.

    ad 1) Yes
    Is there a parameter for DST?
    ad 2) in the WP Setting page the time is correct
    ad 3) Yes, it is right now my dev machine which shows the correct time

    Oh, by the way, is there a parameter for LaunchEvent and how to set it to just hide the counter when reached zero? I found nothing on your doc page…

    Kai

    Just tested it on a second machine (also as localhost): same effect with added parameter timezone=”Europe/Berlin” the countdown adds 2 hours.

    Even when setting a different timezone (e.g. London which is 1 hour behind Berlin) nothing changes. The hour-value is 2 hours too much.

    I checked http://spacedonkey.de/category/t-countdown-control/ for examples.

    You know that approx 80% of the examples are throwing errors?

    Kai

    Plugin Author twinpictures

    (@twinpictures)

    Kai, The spacedonkey link is a test version.
    Try using the latest release candidate from github here:
    https://github.com/baden03/t-minus-countdown

    I tested the github version, re-saved the settings and the page with the countdown-shortcode….but sorry. No change.

    Even when i give as timezone America/New_York (which is 6 hours behind Berlin) the value of the counter remains the same.
    Does it always look at GMT and assumes “Summertime”, regardless the given timezone?

    Kai

    Plugin Author twinpictures

    (@twinpictures)

    Even when i give as timezone America/New_York (which is 6 hours behind Berlin) the value of the counter remains the same.

    Where are you defining this, in WordPress Timezone settings, or using the shortcode attribute? I am not sure if the shortcode timezone attribute has been fully implemented.

    NORMALLY, you would not bother with timezone settings, other than that found in the WordPress > Settings > General > Timezone

    This would then calculate the correct amount of time between NOW and the Launch Time, taking into consideration Leap years and Daylight Savings.

    Regardless, I have time today to get this issue resolved.
    We will set up a server in the Berlin Timezone and use May 29th 2020 13:30 as the target date and post back.

    If you would like to be technically involved, open an issue on github and we’ll create an account on the test server for you to verify that the issue is fixed… if the issue is fixed… no, when the issue is fixed… today!

    Both.
    In the general settings is BERLIN and in the shortcode. But it makes no difference if it is in the shortcode declared or not.
    As mentioned, i assume it is not fully implemented as it makes no diff. Only when giving an unknown timezone (regarding php declaration) you’ll receive an error.

    Being involved would be great. As i’m living in Hamburg as well (and sitting normally in my home office) it would be easy for me to participate.

    As there is exactly on issue on Github with the same …. ahm…. weird behaviour…should i really open a second one?

    I will send you a mail to your “official” mailaddress, then you have mine and can send me the credentials for the account on the test-server.

    Kai

    Addendum

    Even when changing the default timezone in the php.ini nothing changes.

    Really strange.

    Plugin Author twinpictures

    (@twinpictures)

    Version 2.4.6d has just been pushed to the github repo and it should resolve the timezone issue. Changing the timezone of the server would not change the values as the timezone would be used to calculate now and launch date/times.

    For example, New Years even 2021 happens exactly the same amount of time from ‘now’ in Berlin as it does in New York because both ‘now’ and ‘new years’ are based on local timezones.

    Regardless, check out the github release. You can see it in action here:
    https://demo.spacedonkey.de/

    We will do some further testing and if everything checks out, we’ll push the update to the WP repo.

    Yes, yes, yes!

    It looks like working as desired. At least for my case.

    Thanks a lot!

    Ah, btw. is there anywhere a more complete documentation?
    E.g. there is a parameter for LaunchEvent, but not documented.
    How to set it to just hide the counter when the counter reached zero?

    Kai

    Plugin Author twinpictures

    (@twinpictures)

    you can replace the entire countdown with any content you like on launch as shown on the demo page: https://plugins.twinpictures.de/plugins/t-minus-countdown/

    I have also added it to the countdown test here: https://demo.spacedonkey.de/t-countdown-test/

    To replace it with ‘nothing’ you might try something like:
    [tminus t="+5 seconds"] [/tminus]

    The current documentation is found at:
    https://plugins.twinpictures.de/plugins/t-minus-countdown/documentation/

    There has been a full relaunch of the site, with much better documentation coming… but other projects have taken priority. So it goes.

Viewing 11 replies - 1 through 11 (of 11 total)
  • You must be logged in to reply to this topic.