推荐学习书目
› 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
cevincheung
V2EX  ›  Python

arrow 怎么像 PHP 那样设定一个全局时区

  •  
  •   cevincheung ·
    cevin · Oct 14, 2017 · 1609 views
    This topic created in 3270 days ago, the information mentioned may be changed or developed.

    需求是这样。 考虑到多国语言,数据库中存储的都是 utc 时间。

    现在用来做格式化显示必须是arrow.get(timestamp).to(current_tz).format()来进行显示。能不能像 php 那样date_default_timezone_set($tz)在某个部分做一次全局时区设置,例如上下文。

    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1024 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 23ms · UTC 23:10 · PVG 07:10 · LAX 16:10 · JFK 19:10
    ♥ Do have faith in what you're doing.