in reply to Re^2: localtime function
in thread localtime function

Please use <code> tags to preserve formatting.

localtime accepts a time value in seconds. I am guessing that your time values are in milliseconds, so you need to divide them by 1000 to get seconds. If that loss of precision is not acceptable, you may want to switch to a module to handle your time processing needs, such as DateTime.