5 Replies Latest reply on Aug 8, 2012 7:22 AM by kglad

    Working with Date-driven content


      At the company I work for, we're getting into doing a lot of banners which are date-driven utilizing an XML doc as the asset.  Of course, for testing purposes, the only method I know in which to test to make sure that the data is populating correctly is to change the date on my machine.  There are obviously a world of annoyances that come up with changing the date and time on your machine (Outlook, Mail, Time Machine, etc). 


      The question I have is if there is another way of being able to do this?  Is there a widget out there?  I've considered traces but I don't know what to trace and would it even matter if I'm looking for response to a future date v. the current date?


      Any ideas?

        • 1. Re: Working with Date-driven content
          kglad Adobe Community Professional & MVP

          if date/time accuracy is important you should be retrieving the date/time from a server, not locally.  if it's not important you can use a function to return the date/time using the flash date class for deployment and set the date/time manually when testing.

          • 2. Re: Working with Date-driven content
            sinious Most Valuable Participant

            So your content reads the systems local time and generates a banner based upon that from the XML content?


            Easiest thing to do, if you have access to the code, is modify the line of code that retrieves the date and set it explicitly:


            http://help.adobe.com/en_US/as3/dev/WS5b3ccc516d4fbf351e63e3d118a9b90204-7f10.html#WS5b3cc c516d4fbf351e63e3d118a9b90204-7f0c


            You can create the date object with any date you like.



            var myDate:Date = new Date("Wed Aug 1 2012 10:42:00 AM");

            • 3. Re: Working with Date-driven content
              amitchzone Level 1

              I shoud have been clearer.  I actually have this working fine, I'm just looking for a more efficient way to test them to make sure the dates are coming up when they should be. 


              I'm on a Mac and I've tried remote desktop which runs Windows 7 but I couldn't get it to pull in the dynamic info so I was wondering if there was another way of testing something like this.  If i change dates on my Mac, I have to close Outlook and shut down Time Machine as changing dates tends to put things in a tizzy.


              Just looking for another way to to test.

              • 4. Re: Working with Date-driven content
                sinious Most Valuable Participant

                You did mention you just wanted to test it. That's why I mentioned if you have access to creating the SWF you can local test it and set the date explicitly rather than reading the local machines (or servers) time. It's easy to change the date sent into the Date object to generate any date/time you want and then you don't need to mess with your systems time at all.


                Windows in a VM should let you change system time very easily. Just right-click on the clock and select "Adjust date/time". Go to the "Internet Time" tab and verify that time is not being set automatically from "time.windows.com". Hit the "Change Settings" button and uncheck the "Syncronize with an Internet time server". Then you won't be bothered by your clock being auto-fixed for you and you should be able to set the date/time to anything you like for testing.

                • 5. Re: Working with Date-driven content
                  kglad Adobe Community Professional & MVP

                  again, you can set the date/time manually while testing.


                  copy and paste the code you're using to return the date time if you don't understand how to set the date/time manually.