Help Center/
Log Tank Service/
Best Practices/
Log Jobs (Beta)/
Processing Log Data Using DSL Functions/
Scenario 7: Converting Data to Nanosecond-Level Unix Timestamps
Updated on 2025-12-04 GMT+08:00
Scenario 7: Converting Data to Nanosecond-Level Unix Timestamps
You can use LTS's data processing feature to enable nanosecond-precision timestamps. For raw logs that contain Unix time fields, use the e_set operation function to parse these fields into nanosecond-level timestamps.
- Raw log
{ "source": "1.2.3.4", "time": 1704983810, "topic": "test", "log_time_nano":"1705043680630940602" } - Processing rule
e_set( "time", op_div_floor(ct_int(v("log_time_nano")), 1000000000), ) e_set( "time_ns_part", op_mod(ct_int(v("log_time_nano")), 1000000000), ) - Processing result
{ "time_ns_part": 630940602, "log_time_nano": "1705043680630940602", "topic": "test", "source": "1.2.3.4", "time": 1705043680 }
Parent topic: Processing Log Data Using DSL Functions
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
The system is busy. Please try again later.
For any further questions, feel free to contact us through the chatbot.
Chatbot