Author Topic: Countdown timer for New Years  (Read 751 times)

Offline smeighan

  • Moderator
  • Sr. Member
  • *****
  • Posts: 2285
    • Nutcracker RGB Sequence Builder
Countdown timer for New Years
« on: December 30, 2013, »
Don Julien posted this

"It looks like wxWidgets (the framework that xLights uses) is very picky about the input format. The documentation says "This function tries as hard as it can to interpret the given string as date and time.". Well, it's not trying hard enough. 

It looks like RFC822 format works, so as a work-around for now you can enter the date/time using the following format:
Sat, 18 Dec 1999 00:48:30 +0100

(see section 5 of You are not allowed to view links. Register or Login for all the painful details)

There might be variations of this that also work.

Note: output format in xLights is "#d #h #m #s", so you'll need a fairly wide grid to display that unless it's scrolling sideways.

don"

the date time should be set to "It looks like wxWidgets (the framework that xLights uses) is very picky about the input format. The documentation says "This function tries as hard as it can to interpret the given string as date and time.". Well, it's not trying hard enough. 

It looks like RFC822 format works, so as a work-around for now you can enter the date/time using the following format:
Sat, 18 Dec 1999 00:48:30 +0100

(see section 5 of You are not allowed to view links. Register or Login for all the painful details)

There might be variations of this that also work.

Note: output format in xLights is "#d #h #m #s", so you'll need a fairly wide grid to display that unless it's scrolling sideways.

don"


The date should be set to the future and you will then get a countdown.

This is what i am using for new years

"Wed, 01 Jan 2014 00:00:00 +0100"

Matt is the person who added the countdown timer and Don looked into the code. Thansk to both of them

sean


Sean
Littleton, CO
Latest releases You are not allowed to view links. Register or Login
xLights/Nutcracker Forum You are not allowed to view links. Register or Login
Fbook You are not allowed to view links. Register or Login