Convert UTC / Epoch Time to Human Time


#41

I assumed a variable called $localTime would show my local time. It was 8 hours off my local time.


#42

Figured it out:

(actualDate, “d”) gave me a number to compare, and (actualDate, “EEEE”) gave me an actual name of day, so I used those. Much easier than I’d feared.


#43

A few days late but I’ve been working on something similar. The formatDateTime kept returning 1970. What I finally realized is groovy/java is expecting the time to be in milliseconds, not seconds. If you multiply the epoch time by 1000, it can then be properly formatted using formatDateTime().