def page_offset(request):
  """attempts to normalize timestamps into datetimes for offsets"""
  offset = request.GET.get('offset', None)
  if offset:
    try:
      offset = datetime.datetime.fromtimestamp(float(offset))
    except (__HOLE__, ValueError):
      offset = None
  return offset, (offset and True or False)
dataset/ETHPy150Open CollabQ/CollabQ/common/util.py/page_offset