Edgewall Software

Changes between Initial Version and Version 1 of Ticket #1942, comment 71


Ignore:
Timestamp:
Feb 9, 2012, 9:10:04 AM (8 years ago)
Author:
Jun Omae

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #1942, comment 71

    initial v1  
    1 I tried https://bitbucket.org/psuter/trac-1942. The value of custom field has variable width depended on the timestamp. It's not easy to sort the field for a user.
     1I tried https://bitbucket.org/psuter/trac-1942. The value of custom field has variable widths depended on the timestamp. It's not easy to sort the field for a user.
    22
    33||= Time               =||= to_utimestamp      =|| ||
     
    2424-        return str(to_utimestamp(dt))
    2525+        # Padding with '0' would be easy to sort in report page for a user
    26 +        fmt = '%018d' if ts >= 0 else '%-017d'
     26+        fmt = '%018d' if ts >= 0 else '%+017d'
    2727+        return fmt % ts
    2828     else: