Revision 87835e94 snf-pithos-app/pithos/api/util.py

b/snf-pithos-app/pithos/api/util.py
106 106
    Format 'last_modified' timestamp.
107 107
    """
108 108

  
109
    if 'last_modified' in d and d['last_modified']:
110
        d['last_modified'] = utils.isoformat(
111
            datetime.fromtimestamp(d['last_modified']))
109
    timestamps = ('last_modified', 'x_container_until_timestamp',
110
                  'x_acount_until_timestamp')
111
    for timestamp in timestamps:
112
        if timestamp in d and d[timestamp]:
113
            d[timestamp] = utils.isoformat(
114
                    datetime.fromtimestamp(d[timestamp]))
112 115
    return dict([(k.lower().replace('-', '_'), v) for k, v in d.iteritems()])
113 116

  
114 117

  

Also available in: Unified diff