Nope, it's not all working.
What do you need this for? Perhaps there's a better way.
Going to start off with saying it doesn't matter what I need it for. I'm asking for a method of doing it this specific way. I'm very well aware of getDateTime. The very major issue with getDateTime however, is that you cannot accurately manipulate the date.
getUTC gives me exactly what I want and need. An integer which represents the number of seconds since 00:00:00 UTC on 1 January 1970.
Need to add a day? Easy, add 86400. An hour? 3600. Need to compare the amount of time between two times? Just do a simple + or -.
The only problem I have is that I can't figure out how to turn this integer into a date. Which, would be done far less often than manipulating it itself.
The problem with
http://stackoverflow.com/questions/7960318/math-to-convert-seconds-since-1970-into-date-and-vice-versa
is that it's using two variable types. Which is reasonable, considering the code was written in c++. however, torque just turns everything into a float or a string, depending on if you're doing math or string manipulation.
This is causing the math to be wrong. I'm trying different combinations of rounding, flooring, ceiling, on different values but the closest I can get is that it's 1 day behind, skips the 29th, then starts being right, for... idk how long.