added nodejs code for unix time conversion to shared library and added calls where required
reduced conditional statements