Next / Previous / Contents / Shipman's homepage

6.11. PathInfo.modTime(): Modification timestamp in human units

This method translates self.modEpoch to our standard date and time format.

First we convert the epoch time to a local time tuple, then we format it using the time formatting method of the time module.
# - - -   m o d T i m e   - - -

    def modTime ( self ):
        """Format the modification time as yyyy-mm-dd hh:mm:ss."""
        return time.strftime ( TIME_FORMAT,
            time.localtime ( self.modEpoch ) )