本文介绍了如何处理CFML中的时区?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
/www.sustainablegis.com/blog/cfg11n/index.cfm?mode=cat&catid=162AEDB4-20ED-7DEE-2A6CF1B79AC2E03Arel =nofollow noreferrer> Paul Hasting的博客和Coldfusion / Java示例非常有帮助:



别忘了查看他的



如何存储日期可能取决于您的业务逻辑。在一个项目中,我做了一个项目,我们不得不在不同的时区实现人力资源调度,我们用UTC存储日期/时间,并在数据库中使用datediff检查冲突。









How to handle timezones in CFML? So far all apps I've wrote just use the default timezone of the CF server and/or SQL server.

What do you guys usually do? Do you store all dates in GMT with GetTimezineInfo() and then DateAdd(), and translate all time to the correct timezone based on logged in user's preference?

Or do you guys use any java methods?

解决方案

I was looking into the issue some time ago and found Paul Hasting's blog and Coldfusion/Java examples very helpful:

Don't forget to check out his TZCFC test bed

How to store dates will probably depend on your business logic. In a project I did where we had to implement human resource scheduling across timezones we stored dates/times in UTC and used datediff in the database to check for conflicts.

EDIT:

这篇关于如何处理CFML中的时区?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-23 01:36