Closed filak closed 2 years ago
Replace:
gen_date = timestamp[0:10].replace('-','')
Use arrow: https://arrow.readthedocs.io/en/latest/index.html#format
timestamp = '2022-01-22T11:55:29.481010+00:00' # timestamp = data.get('timestamp')
tsa = arrow.get(timestamp)
gen_date = tsa.format('YYYYMMDDHHmmss.S')
# Expected value:
# 20220122115529.4
https://github.com/filak/MTW-MeSH/blob/211dcfff5cdb3823a717178f5859830c6dc27cc2/flask-app/application/utils.py#L696
According to https://loc.gov/marc/bibliographic/bd005.html
16 chars length:
yyyymmddhhmmss.f