diff options
author | Stefan Sperling <ssperling@sysmocom.de> | 2018-12-07 12:30:21 +0100 |
---|---|---|
committer | Stefan Sperling <stsp@stsp.name> | 2018-12-10 16:12:06 +0000 |
commit | 5c14c9ccca83563d07670eb8e9ed5867ca957112 (patch) | |
tree | b36b740fa2a3f8b49cf42baa49eee7c6911e1a08 /sql | |
parent | 705b61bcb795490e265027d0b45499b87dd65e12 (diff) |
display last location update timestamp in vty
Read the subscriber's last location update timestamp from the
database and display it in the output of 'show subscriber'.
For example:
OsmoHLR> show subscriber id 1
ID: 1
IMSI: 123456789000000
MSISDN: 543210123456789
VLR number: 712
SGSN number: 5952
last LU seen: Fri Dec 7 11:30:51 2018 UTC
While the database stores the timestamp as a string, we
convert the timestamp into time_t for internal use.
This allows for flexible potential use of the timestamp
in contexts other than the VTY in the future.
The timestamp displayed in the VTY is created with ctime_r(3).
It does not match the format of the raw string in the database:
sqlite> select id,last_lu_seen from subscriber;
1|2018-12-07 11:30:51
Related: OS#2838
Change-Id: Ie180c434f02ffec0d4b2f651a73258a8126b2e1a
Diffstat (limited to 'sql')
0 files changed, 0 insertions, 0 deletions