Django时间问题 [英] Django Time issues

查看:107
本文介绍了Django时间问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在django中的应用程序需要告诉用户什么时候发生动作。除了询问用户他/她在哪个时区之外,是否有可能在客户端生成时间?



在我的头顶,有没有时间独立的时间的特殊表示(unix时间?),然后我可以简单地将其粘贴到html并让客户端(浏览器)找到时区,然后进行计算?

解决方案

没有自己使用,但我认为这是你正在寻找的。

My app in django requires to tell the user what time an action occurred. Aside from asking the user what timezone he/she is in, is it possible for me to generate the time on the client end?

Off the top of my head, are there a particular representation of time that is timezone independent, (unix time?), and then I can simply paste it into the html and have the client end (browser) findout the timezone and then do the calculation?

解决方案

Haven't used it myself, but I think this is what you are looking for.

这篇关于Django时间问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆