python类html()的实例源码

git_dates.py 文件源码 项目:node-gn 作者: Shouqun 项目源码 文件源码 阅读 20 收藏 0 点赞 0 评论 0
def datetime_string(dt):
  """Converts a tz-aware datetime.datetime into a string in git format."""
  return dt.strftime('%Y-%m-%d %H:%M:%S %z')


# Adapted from: https://docs.python.org/2/library/datetime.html#tzinfo-objects
file_cache.py 文件源码 项目:Webradio_v2 作者: Acer54 项目源码 文件源码 阅读 30 收藏 0 点赞 0 评论 0
def _to_timestamp(date):
  try:
    return (date - EPOCH).total_seconds()
  except AttributeError:
    # The following is the equivalent of total_seconds() in Python2.6.
    # See also: https://docs.python.org/2/library/datetime.html
    delta = date - EPOCH
    return ((delta.microseconds + (delta.seconds + delta.days * 24 * 3600)
             * 10**6) / 10**6)
file_cache.py 文件源码 项目:GAMADV-X 作者: taers232c 项目源码 文件源码 阅读 31 收藏 0 点赞 0 评论 0
def _to_timestamp(date):
  try:
    return (date - EPOCH).total_seconds()
  except AttributeError:
    # The following is the equivalent of total_seconds() in Python2.6.
    # See also: https://docs.python.org/2/library/datetime.html
    delta = date - EPOCH
    return ((delta.microseconds + (delta.seconds + delta.days * 24 * 3600)
             * 10**6) / 10**6)
timezone.py 文件源码 项目:noobotkit 作者: nazroll 项目源码 文件源码 阅读 24 收藏 0 点赞 0 评论 0
def dst(self, dt):
        #ISO8601 specifies offsets should be different if DST is required,
        #instead of allowing for a DST to be specified
        # https://docs.python.org/2/library/datetime.html#datetime.tzinfo.dst
        return datetime.timedelta(0)
git_dates.py 文件源码 项目:depot_tools 作者: webrtc-uwp 项目源码 文件源码 阅读 22 收藏 0 点赞 0 评论 0
def datetime_string(dt):
  """Converts a tz-aware datetime.datetime into a string in git format."""
  return dt.strftime('%Y-%m-%d %H:%M:%S %z')


# Adapted from: https://docs.python.org/2/library/datetime.html#tzinfo-objects
file_cache.py 文件源码 项目:share-class 作者: junyiacademy 项目源码 文件源码 阅读 32 收藏 0 点赞 0 评论 0
def _to_timestamp(date):
  try:
    return (date - EPOCH).total_seconds()
  except AttributeError:
    # The following is the equivalent of total_seconds() in Python2.6.
    # See also: https://docs.python.org/2/library/datetime.html
    delta = date - EPOCH
    return ((delta.microseconds + (delta.seconds + delta.days * 24 * 3600)
             * 10**6) / 10**6)
timezone.py 文件源码 项目:Chorus 作者: DonaldBough 项目源码 文件源码 阅读 33 收藏 0 点赞 0 评论 0
def dst(self, dt):
        #ISO 8601 specifies offsets should be different if DST is required,
        #instead of allowing for a DST to be specified
        # https://docs.python.org/2/library/datetime.html#datetime.tzinfo.dst
        return datetime.timedelta(0)


问题


面经


文章

微信
公众号

扫码关注公众号