Format Unix timestamp as YY/MM/DD HH:MM
(timestamp)
| 980 | |
| 981 | |
| 982 | def format_timestamp(timestamp): |
| 983 | """Format Unix timestamp as YY/MM/DD HH:MM""" |
| 984 | if timestamp is None: |
| 985 | return "" |
| 986 | from datetime import datetime |
| 987 | |
| 988 | try: |
| 989 | dt = datetime.fromtimestamp(timestamp) |
| 990 | return dt.strftime("%y/%m/%d %H:%M") |
| 991 | except (ValueError, OSError): |
| 992 | return "" |
| 993 | |
| 994 | |
| 995 | def strip_model_prefix(model_name): |
nothing calls this directly
no outgoing calls
no test coverage detected