Converts Unix timestamps to formatted date-time strings, or date-time strings to timestamps, supporting both second-level and millisecond-level timestamps with automatic input type detection