Jump to content
Sign in to follow this  
C414AC

Zulu Time

Recommended Posts

H there

I read on a different forum someone trying to implement zulu time onto their Stream Deck, and the solution was to create a local variable and reference it with the script below:

(E:ZULU·TIME,·Seconds)·3600·/·s1·flr·s2·l1·l2·-·60·s3·l2·l3·100·/·+·(>L:AaoZuluTime)·(E:LOCAL·TIME,·Seconds)·3600·/·s1·flr·s2·l1·l2·-·60··s3·l2·l3·100·/·+·(>L:AaoLocalTime)

But I'm getting Zulu time displayed as 1.60 and local time as 19. any ideas? I feel like I may have the RPN syntax wrong.

FYI true local time is 12:24pm and Zulu is 01:24am.

Thanks,

Cam.

Share this post


Link to post
Share on other sites

Can you be more specific what the outcome should be? It seems like two floating point numbers are written into the LVars - but how are they displayed on the SD?

That would make it easier to figure what the script is trying to do - I don't really understand the code, sorry.

Edited by Lorby_SI

LORBY-SI

Share this post


Link to post
Share on other sites

OK, so I am just guessing blindly here: You are probably trying to get a floating point number where the digits in front of the decimal are the hours and those after the decimal point are the minutes - is that correct? In that case there is a multiplication missing in your script, between 60 and s3, in both cases

(E:ZULU·TIME,·Seconds)·3600·/·s1·flr·s2·l1·l2·-·60·*·s3·l2·l3·100·/·+·(>L:AaoZuluTime)·(E:LOCAL·TIME,·Seconds)·3600·/·s1·flr·s2·l1·l2·-·60·*·s3·l2·l3·100·/·+·(>L:AaoLocalTime)

But there is half a dozen ways of doing this, some more involved than others. 


LORBY-SI

Share this post


Link to post
Share on other sites
On 2/16/2024 at 6:13 PM, Lorby_SI said:

Can you be more specific what the outcome should be? It seems like two floating point numbers are written into the LVars - but how are they displayed on the SD?

That would make it easier to figure what the script is trying to do - I don't really understand the code, sorry.

Firstly mate, you’re awesome. I note how quickly you reply to everyone and in depth.

I believe you actually wrote the code 😄. I copied it from a thread on fs.com from a few years back. There were 2 examples given, identical except and one was missing the multiplication.

I’ll add those back in and report back

cheers,

Cam.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...