Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Forums Adobe After Effects Expressions Expression to create different times for different countries based on GMT

  • Expression to create different times for different countries based on GMT

  • Chris Huggett

    March 22, 2007 at 2:59 pm

    Hi Guys

    Im doing a job for a TV station that shows its promos in different neighbouring countries. The Packshot at the end of the promo has 5 different times that the program will start for 5 different countires. Because the times that they start are always a set amount of time after the first one airs, i was hoping to only enter the time (eg18.00) and have that then ripple to the next country that starts the same program an hour later, then then next country an hour after that and so on.

    In the example below, the times are all one text layer, seperated with leading only.

    Country 1 Country 2 Country 3 Country 4 Country 5
    Program 1 18.00 +1hr +2hrs +1hr +.30
    Program 2 19.00
    Program 3 19.30
    Program 4 21.00

    Cheers guys

    Chris

  • Filip Vandueren

    March 23, 2007 at 12:16 am

    Ok,

    so the names of the programs are in 1 layer,
    the times of one timezone are in another text-layer: 1 time per line.
    delete the other timezone textLayers for now.

    step 1:
    create a textLayer called “guideText”, make it a guideLayer so it doesn’t render out.
    in this Layer, enter all the times as 18:00 instead of 18.00,
    one time per line.

    step 2:
    create a new (empty) text Layer
    add an expression control type Slider to your text layer.
    Rename this Slider to “offsetMinutes” !

    step 3:
    add this expression to your Source Text attribute of the new textlayer:

    parentText=thisComp.layer("guideText");
    l=parentText.text.sourceText.split ("\r");

    offset = effect("offsetMinutes")("Slider") * 1000 * 60;
    newText="";
    for (var i=0; i

    Step 4:
    Make as many copies of the textLayer as you need,
    Adjust the slider to 60 for 1 hour difference, etc.

    Now you just change the times in the guideLayer (make sure it retains it's name)
    The other layers will update automagically...

    here's an example comp I setup:

    https://www.vandueren.be/forumstuff/expressions/timezones.aep

  • Chris Huggett

    March 23, 2007 at 9:14 am

    Filip

    Your a genius. This is exactly what im after. Thank you ever so much.

    Bestest regards
    Chris

Viewing 1 - 3 of 3 posts

Log in to reply.

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy