java对世界各个时区(timezone)的通用转换处理方法(Java general conversion processing method for each time zone (timezone) of the world).docVIP
- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
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.
您可能关注的文档
- 3、如何理解近代以来无数仁人志士探索国家出路的艰辛历程及其历史意义(3, how to understand the hardships of modern history of countless men and women with high ideals to explore the national way and its historical significance).doc
- 3t6管控12要点(不含售前四步法介绍)]测试题(3T6 control 12 points (without pre-sale, four steps introduction) test questions).doc
- 360°解析杜曼早教及如何使用闪卡【(360 degrees parsing Du early education and how to use flash card).doc
- 3_15品牌生活的卫道士(3_15 brand life guard).doc
- 3周年策划(3rd Anniversary planning).doc
- 3道3年级数学题—智力题, 3分钟之内10人做9人错(3, grade 3 math problems - puzzles, 3 minutes, 10 people do, 9 people wrong).doc
- 4,教育法规概论(高中)(4, an introduction to educational regulations (high school)).doc
- 4.苹果公司的ceo (每日一小故事)(4. Apple Corp's CEO (a little daily story)).doc
- 400斤重的猪如何过一座承重只有200斤的桥呢(How about 400 kilos of pigs crossing a bridge with a weight of only 200 kilos).doc
- 40种让人类量子提升进化至新人类的核心理念(40 core concepts that allow human quantum ascension to evolve into new human beings).doc
- java读写追加删除xml节点(Java reads, writes, appends, and deletes XML nodes).doc
- java虚拟机的内存设置(Memory settings for the Java virtual machine).doc
- it职场求生法则(加强版)(It law of survival in the workplace (enhanced version)).doc
- jdbc学习笔记——jdbc性能优化-by jon(JDBC learning notes - JDBC performance tuning, -by, Jon).doc
- jdpl的使用(The use of jdpl).doc
- java的synchronized关键字同步机制总结(Java's synchronized keyword synchronization mechanism summary).doc
- jhi(兆惠).doc
- jit应用(JIT applications).doc
- jp女生宿舍囧事簿(JP dormitory embarrassed thing book).doc
- jsp考试复习那些必考(JSP exam review the compulsory).doc
文档评论(0)