Jump to content
Sign in to follow this  
hotwires

RTC to UTC

Recommended Posts

What are the "UTC to Date Time" and "Date Time to UTC" function blocks for? Could not locate reference in the textual help. I know RTC= Real time Clock and guess UTC is universal coordinated time? What sparked this question is that I was wanting to have a data tag that  would show the date in MM/DD/YYYY for display in an HMI element to use as  a "counter reset last on date mm/dd/yyyy" . The RTC date stuct parses out the elements of the date as a whole, so I'm guessing I would have to piece it together with logical functions? Just wondered if there was an easier way (I'm always looking for those). Thanks

-hw

Share this post


Link to post
Share on other sites

UTC to Date Time takes a UTC number (Unix time) which is the number of seconds since 1900 (in this case), and outputs 2 tags, an RTC Date, and an RTC Time structs, which contains the converted time and time for the given input.

 

Date Time to RTC does the opposite. (For example, the input #3695610531 would result Date: 9/2/2017, and time 06:28:51

 

  • Upvote 1

Share this post


Link to post
Share on other sites
5 minutes ago, Saragani said:

UTC to Date Time takes a UTC number (Unix time) which is the number of seconds since 1900 (in this case), and outputs 2 tags, an RTC Date, and an RTC Time structs, which contains the converted time and time for the given input.

 

Date Time to RTC does the opposite. (For example, the input #3695610531 would result Date: 9/2/2017, and time 06:28:51

 

OK, wow. Would never have guessed that. Not relevant to any applications of mine. We will reach a time when the UTC will exceed the number 32 bits can express. I'm not going to calculate when that will be, to late at night for that. Made me think of the IPv4 to IPv6 scheme. Thanks for the swift and concise reply.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...