V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
GeekGao
V2EX  ›  Python

很蛋疼的一个站,一个域名+一张页面介绍 python 日期输出格式的使用

  •  
  •   GeekGao · 2014-12-11 10:21:06 +08:00 · 3029 次点击
    这是一个创建于 3414 天前的主题,其中的信息可能已经有所发展或是发生改变。
    9 条回复    2014-12-11 20:31:15 +08:00
    lincanbin
        1
    lincanbin  
       2014-12-11 11:32:59 +08:00
    确实很有必要啊,例如一个时间字符串转Unix时间戳:

    Python: int(time.mktime(time.strptime(target_time, "%Y-%m-%d %H:%M:%S")))
    PHP: strtotime($target_time);
    PrideChung
        2
    PrideChung  
       2014-12-11 11:36:43 +08:00   ❤️ 2
    GeekGao
        3
    GeekGao  
    OP
       2014-12-11 13:06:08 +08:00
    @lincanbin
    @PrideChung

    偶只是认为没必要为了这个目的单独购买个域名做这件事 ^_^
    jsjscool
        4
    jsjscool  
       2014-12-11 13:10:12 +08:00
    @GeekGao 任性
    eternityz
        5
    eternityz  
       2014-12-11 13:12:02 +08:00   ❤️ 1
    手里有个 UIViewController.com 没想好干点啥
    mengzhuo
        6
    mengzhuo  
       2014-12-11 13:49:46 +08:00
    来个实用的
    ifconfig.me
    toben
        7
    toben  
       2014-12-11 17:25:58 +08:00
    他只是在嘲讽strftime
    futursolo
        8
    futursolo  
       2014-12-11 18:48:56 +08:00
    http://www.olivida.com/
    同楼上,没什么稀罕的
    dcty
        9
    dcty  
       2014-12-11 20:31:15 +08:00
    @eternityz 直接把官方的API贴上去。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1001 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 80ms · UTC 19:56 · PVG 03:56 · LAX 12:56 · JFK 15:56
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.