Articles in this section

Converting the LUT of a record to readable time

Context

You have an LUT for a record, and now you need to see that time in real time.
 

Method

You can use a simple script to convert the LUT :
 
#!/bin/bash
LUT=$1
CITRUSLEAF_EPOCH=1262304000
EPOCH=$(bc <<< "scale=3; (${LUT}/1000)+${CITRUSLEAF_EPOCH};")
EPOCH_WHOLE=$(echo ${EPOCH} | cut -f1 -d ".")
EPOCH_DECIMAL=$(echo ${EPOCH} | cut -f2 -d ".")
CONV=$(date -u -r ${EPOCH_WHOLE} +"%Y/%m/%d %H:%M:%S.${EPOCH_DECIMAL} %Z")
echo "LUT :"${LUT}
echo "EPOCH :"${EPOCH}
echo "Date :"${CONV}

Example output :
user@test: ~ % ./convert_lut.sh 440335053256
LUT :440335053256
EPOCH :1702639053.256
Date :2023/12/15 11:17:33.256 UTC


 

Notes

How to get LUT's : https://support.aerospike.com/s/article/How-to-get-LUT-last-update-time-of-a-record

Applies To Earliest Version

Pre 4.9

Applies To Latest Version

Current Version
Was this article helpful?
0 out of 0 found this helpful