java对世界各个时区(timezone)的通用转换处理方法(Java general conversion processing method for each time zone (timezone) of the world).doc

java对世界各个时区(timezone)的通用转换处理方法(Java general conversion processing method for each time zone (timezone) of the world).doc

  1. 1、本文档共19页,可阅读全部内容。
  2. 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
java对世界各个时区(timezone)的通用转换处理方法(Java general conversion processing method for each time zone (timezone) of the world)

java对世界各个时区(timezone)的通用转换处理方法(Java general conversion processing method for each time zone (timezone) of the world) Java general conversion processing method for each time zone (TimeZone) of the world In the process of developing international software projects, some special requirements are sometimes met. For example: for example, you do is a shopping website (assuming the server in Shanghai, China) when the order to buy something customers around the world on your website, customers often want to see where the underground single time, for example, I am an American in the new Yorker, I order you on the website after you. I see a Shanghai single time, will feel very strange. As we all know, New York time relative to Shanghai time about 13 hours later, if let customers see the time zone of the local time, will become more in line with the customers time concept, make the customer understand more convenient. In fact, Java has long been considered the world time zone (TimeZone) of this problem, and gives reasonable solutions, can be more convenient for the world time conversion, a time zone into another time zone. You can see the actual example below (the main () method of running the example). As to how to know the time zone of the customer, you can calculate the time zone based on the customers IP or the country where the user registers. Java code 01./* 2 * Created on 2005-6-10 3 * Author Stephen 4 * Email, zhoujianqiang, AT, Gmail, DOT, com 5 * CopyRight (C) 2005-2008, All rights reserved. 6. 07.package com.soft4j.utility; Eight 09.import java.text.ParseException; 10.import java.text.SimpleDateFormat; 11.import java.util.Date; 12.import java.util.GregorianCalendar; 13.import java.util.TimeZone; 14.import java.util.Vector; Fifteen 16.import com.soft4j.log.Log; Seventeen 18./** 19. * some common tools and methods related to date and time 20. * p 21. * date (time) commonly used format (formater), mainly: br 22. * yyyy-MM-dd HH:mm:ss br * 23. 24. * @author Stephen 25.

您可能关注的文档

文档评论(0)

jgx3536 + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

版权声明书
用户编号:6111134150000003

1亿VIP精品文档

相关文档