Home AMX User Forum AMX General Discussion

Epoch converter ?

Did I miss something or we have none function in Netlnix language to convert from epoch to human time and back ?*Very strange considering all NetLinx controllers run on Unix/Linux systems :(

Vincèn

Comments

  • a_riot42a_riot42 Posts: 1,624
    vincen wrote: »
    Did I miss something or we have none function in Netlnix language to convert from epoch to human time and back ?*Very strange considering all NetLinx controllers run on Unix/Linux systems :(

    Vincèn

    Actually they run on VXWorks, and the new controllers are some Linux variation. There is no function to do what you are trying to do. You would have to write your own converter or ask the internet.
    Paul
  • vincenvincen Posts: 526
    a_riot42 wrote: »
    There is no function to do what you are trying to do. You would have to write your own converter or ask the internet.
    Sad*AMX*didn't think to add the feature but no big deal as it looks conversion from Epoch to human is pretty simple ;) lot easier than I expected :D
  • markhmarkh Posts: 10
    Did you ever get an epoch converter written ? Doesn't look too simple to me, unless you feel like wasting a whole day writing and testing for a simple conversion. Maybe I'm running scared when I shouldn't be, was it easy ? Do you have tips or code to share ?

  • viningvining Posts: 4,368
    markh wrote: »
    Did you ever get an epoch converter written ? Doesn't look too simple to me, unless you feel like wasting a whole day writing and testing for a simple conversion. Maybe I'm running scared when I shouldn't be, was it easy ? Do you have tips or code to share ?

    vincen hasn't posted here in a long time.
  • John NagyJohn Nagy Posts: 1,742
    He last logged in here on 11.28-2017. Four months isn't TOOOOOO long....
  • viningvining Posts: 4,368
    John Nagy wrote: »
    He last logged in here on 11.28-2017. Four months isn't TOOOOOO long....
    Yeah, that?s not so bad. His last post was a year before that and back in the good old days he was a regular participating member like so many others including myself. There?s probablly a lot of folks who poke their heads in from time to time for old time sakes just to see how the old girl is doing.
  • markhmarkh Posts: 10
    Ok, for anyone searching epoch times like I was. Here's a good link to some info/algorithms on the subject.

    https://stackoverflow.com/questions/7960318/math-to-convert-seconds-since-1970-into-date-and-vice-versa

    I still find useful stuff in here, regardless of age (my age, age of post etc...)

    :P
Sign In or Register to comment.