Output dual TZ format from rk_imsi function
This commit is contained in:
parent
c1c4835ea2
commit
99149dc916
1 changed files with 9 additions and 5 deletions
|
@ -76,16 +76,20 @@ f() {
|
||||||
|
|
||||||
rk_ext() {
|
rk_ext() {
|
||||||
IMSI=$(curl -X GET http://10.23.0.3:8098/buckets/hlr/index/msisdn_bin/$1 2>/dev/null| python -c "import sys, json; print json.load(sys.stdin)['keys'][0]")
|
IMSI=$(curl -X GET http://10.23.0.3:8098/buckets/hlr/index/msisdn_bin/$1 2>/dev/null| python -c "import sys, json; print json.load(sys.stdin)['keys'][0]")
|
||||||
echo $IMSI
|
echo "IMSI: [$IMSI]"
|
||||||
rk_imsi $IMSI
|
if [ "$IMSI" != "" ]; then
|
||||||
|
rk_imsi $IMSI
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
rk_imsi() {
|
rk_imsi() {
|
||||||
JSON=$(curl -X GET http://10.23.0.3:8098/buckets/hlr/keys/$1 2>/dev/null)
|
JSON=$(curl -X GET http://10.23.0.3:8098/buckets/hlr/keys/$1 2>/dev/null)
|
||||||
echo $JSON
|
echo $JSON
|
||||||
echo -n "That's a Last Update of: "
|
echo -n "That's a Last Update of: ["
|
||||||
echo $JSON | cut -d\ -f6 | gawk '{print strftime("%c", $0, 1)}'
|
echo $JSON | cut -d\ -f6 | gawk '{print strftime("%c", $0, 1)}' | tr -d '\n'
|
||||||
echo
|
echo -n "] / Mexico City Time: ["
|
||||||
|
TZ=America/Mexico_City date -d @`echo $JSON | python -c "import sys, json; print(json.load(sys.stdin)['updated'])"` | tr -d '\n'
|
||||||
|
echo "]"
|
||||||
}
|
}
|
||||||
|
|
||||||
check_trx() {
|
check_trx() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue