return datetime.datetime
497477
def modified(self):
        ''
        return dateutil.parser.parse(str(self.f.latestRevision.modified))
584583
def to_datetime(timestamp):
    """"""
    return dt.fromtimestamp(time.mktime(
        time.localtime(int(str(timestamp)[:10]))))
1279599
def getDate(self):
        ""
        date = self.headers.get('date')
        if date:
            date = self.convertTimeString(date)
        return date
836087
def now_time(str=False):
    """"""
    if str:
        return datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S")
    return datetime.datetime.now()
885857
def current_time(self) -> datetime:
        """"""
        _date = datetime.strptime(self.obj.SBRes.SBReq.StartT.get("date"), "%Y%m%d")
        _time = datetime.strptime(self.obj.SBRes.SBReq.StartT.get("time"), "%H:%M")
        return datetime.combine(_date.date(), _time.time())
584920
def datetimes(self):
        """"""
        if self.timestep == 1:
            return tuple(dt.add_minute(30) for dt in
                         self.direct_normal_irradiance.datetimes)
        else:
            return self.direct_normal_irradiance.datetimes
139978
def get_python(self):
        """"""
        value = super(DatetimeField, self).get_python()

        if value is not None:
            # Handle subtypes with matching Pendulum types
            if self.input_type == self._type_time:
                value = value.time()
            if self.input_type == self._type_date:
                value = value.date()

        return value
408888
def get_datetime(epoch):
    '''
    
    '''

    t = time.gmtime(epoch)
    dt = datetime.datetime(*t[:6])

    return dt
1023748
def str_to_time(self):
        

        return datetime(*list(map(int, re.split(r'-|:|T', self.time))))
354786
def datetime(anon, obj, field, val):
    
    return anon.faker.datetime(field=field)
126447
def datetimes(self):
        """"""
        if self._datetimes is None:
            self._datetimes = tuple(self.header.analysis_period.datetimes)
        return self._datetimes
1334481
def today(year=None):
    """"""
    return datetime.date(int(year), _date.month, _date.day) if year else _date
1368039
def getTime(self):
    
    headers = self._headers
    timeStringIndex = headers.index(TIMESTAMP_FIELD)
    timeString = self.peek()[timeStringIndex]
    return  datetime.strptime(timeString, "%Y/%m/%d %H:%M:%S")
1247575
def str_to_datetime(dt_str, fmt='%Y-%m-%d %H:%M:%S'):
    
    d_time = datetime.datetime.strptime(dt_str, fmt)
    return d_time
873467
def um_date_to_date(d):
    

    return datetime.datetime(year=d[0], month=d[1], day=d[2],
                             hour=d[3], minute=d[4], second=d[5])
1026463
def to_datetime(data):
    
    my_date_time = None

    if 'published_parsed' in data:
        my_date_time = datetime.datetime.utcfromtimestamp(time.mktime(data.get('published_parsed')))
    elif 'created_parsed' in data:
        my_date_time = datetime.datetime.utcfromtimestamp(time.mktime(data.get('created_parsed')))
    elif 'updated_parsed' in data:
        my_date_time = datetime.datetime.utcfromtimestamp(time.mktime(data.get('updated_parsed')))
    elif 'my_date' in data:
        my_date_time = arrow.get(data['my_date'])

    return my_date_time
645088
def to_datetime(value):
    """"""
    if value is None:
        return None

    if isinstance(value, six.integer_types):
        return parser.parse(value)
    return parser.isoparse(value)