Skip to content

Incorrect localTime when enabling countdown #4197

Open

Description

@HackerShurf

What happened?

When I set the feature to turn on the countdown timer it sets the date to some time in the 1970s

To Reproduce Bug

Turn on the NTP
set to scrolling text
let it establish the correct time and date
Turn on countdown timer option with any date in 2025 I was using august 25, 2025

Expected Behavior

To show a count down timer to the date

Install Method

Binary from WLED.me

What version of WLED?

0.15.0-b6

Which microcontroller/board are you seeing the problem on?

ESP32

Relevant log/trace output

No response

Anything else?

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Activity

  1. blazoncek commented on Oct 17, 2024

    @blazoncek
    Contributor

    What makes you think Scrolling text will display countdown?

  2. HackerShurf commented on Oct 17, 2024

    @HackerShurf
    Author

    What makes you think Scrolling text will display countdown?

    It used to in previous versions I've had other people test. Looks like it has not worked for a few versions. Unless you have instructions on how to make the countdown timer work.

  3. blazoncek commented on Oct 17, 2024

    @blazoncek
    Contributor

    I am the author of Scrolling text effect and I know I never implemented "coundown" of any kind. 😄

  4. HackerShurf commented on Oct 17, 2024

    @HackerShurf
    Author

    SmartSelect_20241017_002844
    Checking the box for countdown used to mak it count down to that date and time unless I'm mistaken.

  5. HackerShurf commented on Oct 17, 2024

    @HackerShurf
    Author

    I am the author of Scrolling text effect and I know I never implemented "coundown" of any kind. 😄

    But if you developed it then it must be a different item or setup. But I guess it needs to be a feature request then.

  6. dosipod commented on Oct 17, 2024

    @dosipod
    Contributor

    @HackerShurf It is actually working if you play with the date ( the calculation is wrong though ) but scrolling text will do countdown , feature it is but it is a bug

    Countdown_b6_FIX.mov
  7. softhack007 commented on Oct 17, 2024

    @softhack007
    Member

    Checking the box for countdown used to make it count down to that date and time unless I'm mistaken.

    "countdown mode" is actually a feature of the "analog clock overlay". This is an overlay effect for 1D rings. So it has no relation with 2D scrolling text.

  8. changed the title [-]Countdown timer does not display countdown[/-] [+]Countdown Mode: countdown display in 2D scrolling text effect?[/+] on Oct 17, 2024
  9. DedeHai commented on Oct 17, 2024

    @DedeHai
    Collaborator

    Checking the box for countdown used to make it count down to that date and time unless I'm mistaken.

    "countdown mode" is actually a feature of the "analog clock overlay". This is an overlay effect for 1D rings. So it has no relation with 2D scrolling text.

    then this is a bug? if its just for analog clock overlay it should not change the behaviour of scrolling text IMHO. A good fix would be to allow it in scrolling text instead of braking it.

  10. softhack007 commented on Oct 17, 2024

    @softhack007
    Member

    @DedeHai I wouldn't say it's a bug, but a feature that could be added to scrolling text. Right now I have no idea which "tag" could be used - maybe append a "Z" so that "#MMDD" shows month and date, but "#MMDDZ" shows countdown months and days.

    I wouldn't change the display automatically based on a checkbox in time settings - this relation would be hard to understand for users who are running their digital clocks with WLED.

  11. DedeHai commented on Oct 17, 2024

    @DedeHai
    Collaborator

    I wouldn't change the display automatically based on a checkbox in time settings - this relation would be hard to understand for users who are running their digital clocks with WLED.

    isn't that what it is currently doing i.e. what the issue was opened for?

  12. 7 remaining items

  13. 5chubrakete commented on Oct 20, 2024

    @5chubrakete
    Contributor

    It might also make sense to add (or chage the meaning of) some tags. e.g. having #DDDD display the total days so target instead of days to end of month requiring the display of month and years in addition.

    I'dd prefer a) as well.

  14. dosipod commented on Oct 23, 2024

    @dosipod
    Contributor

    After a few tests the countdown TIME seems to work fine. The DATE is offset by 1.1.1970. since: if (countdownMode) localTime = n - countdownTime + utcOffsetSecs; So maybe we can subtract 1, 1 and 1970 before displaying DD, MO, YY, YYYY and DATE in this mode. Am-time and string representations of month or days make no sense though. So display "-" or ?

    I also found that during effect transitions the localtime is displayed instead of the countdown time. (flickering)
    @5chubrakete
    I did not see this and yeah i have tested now as below and it is the offset by 1.1.1970 ,
    image
    Note: I added one day using that site to the target date of Oct 25,2024 but the math checks out

  15. added this to the 0.15.1 candidate milestone on Nov 2, 2024
  16. modified the milestones: 0.15.2, 0.15.3 on Nov 8, 2025
  17. modified the milestones: 0.15.4, 0.15.5 on Mar 8, 2026
  18. modified the milestones: 0.15.5, 16.1 on Mar 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions