Author Topic: Text effect - Count Down formats  (Read 8758 times)

Offline flyinverted

  • Administrator
  • Hero Member
  • *****
  • Posts: 756
    • View Profile
Re: Text effect - Count Down formats
« Reply #15 on: August 13, 2015, 02:07:17 PM »
From the manual on Page 88.
Steve Giron
Maricopa County, AZ
xLights user with a boat-load of channels.

Do not ask to know all the answers, but ask to understand the question.

Offline flyinverted

  • Administrator
  • Hero Member
  • *****
  • Posts: 756
    • View Profile
Re: Text effect - Count Down formats
« Reply #16 on: August 13, 2015, 02:16:49 PM »
He's got a good point about the timers being from the render time and not the show time since no code is executed on the show time unless you're manually playing a sequene from the sequener window and have output to lights checked.  I have updated the document with a little more detail about that.
Steve Giron
Maricopa County, AZ
xLights user with a boat-load of channels.

Do not ask to know all the answers, but ask to understand the question.

Offline sean

  • Administrator
  • Hero Member
  • *****
  • Posts: 1727
    • View Profile
    • Xlights and Nutcracker Forum
Re: Text effect - Count Down formats
« Reply #17 on: August 13, 2015, 02:20:35 PM »
Steve, the reason i ask is that is till get invalid date.

I am using "Fri, Dec 25 2015 00:00:00 +0100"

Sean
Littleton, CO
Latest releases http://nutcracker123.com/nutcracker/releases
xLights/Nutcracker Forum http://nutcracker123.com/forum/index.php
Fbook [url=https://www.facebook.com/groups/62

Offline flyinverted

  • Administrator
  • Hero Member
  • *****
  • Posts: 756
    • View Profile
Re: Text effect - Count Down formats
« Reply #18 on: August 13, 2015, 02:46:30 PM »
RTFM Read the Fine Manual.

Try this:  Fri, 25 Dec 2015 00:00:00 +0100

« Last Edit: August 13, 2015, 02:50:07 PM by flyinverted »
Steve Giron
Maricopa County, AZ
xLights user with a boat-load of channels.

Do not ask to know all the answers, but ask to understand the question.

Offline flyinverted

  • Administrator
  • Hero Member
  • *****
  • Posts: 756
    • View Profile
Re: Text effect - Count Down formats
« Reply #19 on: August 13, 2015, 02:53:31 PM »
I will add that this conforms to RFC822 on dates/times.

https://validator.w3.org/feed/docs/error/InvalidRFC2822Date.html

timezones EST, PST etc are valid as is GMT as well as the numeric offset (-0700)


Steve Giron
Maricopa County, AZ
xLights user with a boat-load of channels.

Do not ask to know all the answers, but ask to understand the question.

Offline sean

  • Administrator
  • Hero Member
  • *****
  • Posts: 1727
    • View Profile
    • Xlights and Nutcracker Forum
Re: Text effect - Count Down formats
« Reply #20 on: August 13, 2015, 02:59:19 PM »
Thanks Steve, it is so easy to transpose one form.

So i did try all three of these and they work
"Wed, 02 Oct 2015 08:00:00 EST"
"Wed, 02 Oct 2015 13:00:00 GMT"
"Wed, 02 Oct 2015 15:00:00 +0200"

Note if the date you enter is in the past , like this

"Wed, 02 Oct 2002 15:00:00 +0200"

Then you get the not very helpful "Invalid Date" message.

Sean
Littleton, CO
Latest releases http://nutcracker123.com/nutcracker/releases
xLights/Nutcracker Forum http://nutcracker123.com/forum/index.php
Fbook [url=https://www.facebook.com/groups/62

Offline gerry

  • Hero Member
  • *****
  • Posts: 695
    • View Profile
Re: Text effect - Count Down formats
« Reply #21 on: August 13, 2015, 03:02:12 PM »
gerry can you post here a date that works for the countdown?

i will also add it to the prompt in the effect.
we really should modiy the code so it recognizes many date time formats. i know when don julien wrote this code he wanted it to be able to use a formatted string.

Hello Sean,

He did provide for a formatted string (the last option) . It causes xL to crash unless u get it exactly right (as I think it does the parsing as you are keying in the value) - I will raise a github issue later today , describing how to get that exactly right and when the crashes occur  .  So after about 5-6 attempts and crashes I stopped trying to look at all the permutations (for the !fmt option) that were documented in the code. The one that is in the manual works. Enter (or copy) the text first and then change the selection to the !fmt value - not the other way round.


Gerry

Offline gerry

  • Hero Member
  • *****
  • Posts: 695
    • View Profile
Re: Text effect - Count Down formats
« Reply #22 on: August 13, 2015, 03:09:42 PM »

"Wed, 02 Oct 2002 15:00:00 +0200"

Then you get the not very helpful "Invalid Date" message.

Got that message for about the 100 other combinations that I tried with and without quotes and apostrophes   :)  , until I carefully looked at the code - thanks Dan. Even after it started displaying values I had to try  Mel time to determine what I was getting for each format as the format is the output format rather than the input format. The input is kind of fixed..which makes sense I suppose from a code perspective.   
Gerry

Offline flyinverted

  • Administrator
  • Hero Member
  • *****
  • Posts: 756
    • View Profile
Re: Text effect - Count Down formats
« Reply #23 on: August 13, 2015, 03:10:48 PM »
Thanks Steve, it is so easy to transpose one form.

So i did try all three of these and they work
"Wed, 02 Oct 2015 08:00:00 EST"
"Wed, 02 Oct 2015 13:00:00 GMT"
"Wed, 02 Oct 2015 15:00:00 +0200"

Note if the date you enter is in the past , like this

"Wed, 02 Oct 2002 15:00:00 +0200"

Then you get the not very helpful "Invalid Date" message.

I too was getting the invalid message and I was stumped. That RFC does not like the American version of putting the day of the month in front.  Makes no sense on how America represents the units out of order for the date, but that's another topic of discussion. No wonder someone from Australia was able to figure it out!
Steve Giron
Maricopa County, AZ
xLights user with a boat-load of channels.

Do not ask to know all the answers, but ask to understand the question.

Offline gerry

  • Hero Member
  • *****
  • Posts: 695
    • View Profile
Re: Text effect - Count Down formats
« Reply #24 on: August 13, 2015, 03:21:24 PM »

No wonder someone from Australia was able to figure it out!

Nothing to do with being from Australia :) .  I did look at the specs that you linked to Steve, as was most annoyed at that message , but figured that the programmer would have checked that it was working , so I just had to find the correct format. 
It helped that in a previous life I used to code... and when Dan sent though the code, I should have looked at it more carefully in the first instance as it is actually quite well documented.
Gerry