Did I find the right examples for you? yes no

All Samples(2)  |  Call(2)  |  Derive(0)  |  Import(0)
convert epoch time in datetime

    Args:
       a_epoch: the epoch time to convert

    Returns: a datetime

        def e2datetime(a_epoch):
    """
        convert epoch time in datetime

            Args:
               a_epoch: the epoch time to convert

            Returns: a datetime
    """

    #utcfromtimestamp is not working properly with a decimals.
    # use floor to create the datetime
#    decim = decimal.Decimal('%s' % (a_epoch)).quantize(decimal.Decimal('.001'), rounding=decimal.ROUND_DOWN)

    new_date = datetime.datetime.utcfromtimestamp(a_epoch)

    return new_date
        


src/g/m/gmvault-HEAD/src/gmv/gmvault_db.py   gmvault(Download)
        metadata = json.load(meta_fd)
 
        metadata[self.INT_DATE_K] =  gmvault_utils.e2datetime(metadata[self.INT_DATE_K])
 
        # force convertion of labels as string because IMAPClient

src/g/m/gmvault-1.8.1-beta/src/gmv/gmvault_db.py   gmvault(Download)
        metadata = json.load(meta_fd)
 
        metadata[self.INT_DATE_K] =  gmvault_utils.e2datetime(metadata[self.INT_DATE_K])
 
        # force convertion of labels as string because IMAPClient