human_time

astropy.utils.console.human_time(seconds)[source]

Returns a human-friendly time string that is always exactly 6 characters long.

Depending on the number of seconds given, can be one of:

1w 3d
2d 4h
1h 5m
1m 4s
  15s

Will be in color if console coloring is turned on.

Parameters:
secondspython:int

The number of seconds to represent

Returns:
timepython:str

A human-friendly representation of the given number of seconds that is always exactly 6 characters.