How to convert unix/utc time?

 

Hi there.

From some API I get a timestamp in unix epoch(?) like 1662982011

Trying TextToTime module throws an error when I try to convert that number to ...well... readable time.

What am I doing wrong?

Cheers & all the best.

Eric.


   EricWest

 
Profile Image
Eifert@Aximmetry
  -  

Hi Eric,

You will need to use the Time To Text module. Also, Aximmetry has a global base date which is being used by this module.

So, you will first need to set the Base date in File->Properties->Timing to the epoch format's base date which is 1970-01-01 00:00:
You may want to turn off the Use defaults for Timing. This way this Base date setting is saved with the compound.

Note, this will change the base date everywhere where the Date And Time format is used. For example, in the Sequencer Editor, you can set the timeline to use the Date And Time format...


Then you need to do the following setup in the Flow Editor:

Where you give the 1662982011 epoch time value in the Copy Integer module.

Note, we have all the Date Time Formatting options listed here: https://aximmetry.com/learn/tutorials/for-content-creators/format-strings/#time-to-text-module-date-time-format-pin

Warmest regards,

;