Using date time in Java ee application

This question already has an answer here:

  • Daylight saving time and time zone best practices [closed] 30 answers

  • You're right in thinking to store the date in GMT format. You'll have to understand the context, specifically meaning time zone. So it's always preferable to bring them to your local time zone before comparison as in case with your administration portal.

    Now, coming to user portal where you have different user time zone, its better to have the GMT date sent as is and you'll need a way to get the user time zone and format to appropriate time zone before displaying it to the user.

    链接地址: http://www.djcxy.com/p/29348.html

    上一篇: 保存和检索从客户端到数据库的时间

    下一篇: 在Java ee应用程序中使用日期时间