Example Analysis of CreateTime developed by Wechat
Editor to share with you the Wechat development of CreateTime example analysis, I believe that most people do not know much about it, so share this article for your reference, I hope you will learn a lot after reading this article, let's go to understand it!
Createtime in Wechat is the number of seconds between January 1, 1970 and 00:00:00 when the message is created. The Createtime can be obtained in the following two ways:
Long createtime = System.currentTimeMillis (); long createtime = new java.util.Date () .getTime ()
The way to convert createtime to the current time is as follows:
Long msgCreatetime = Long.pareseLong (createtime) * 1000L; DateFormate format= new SimpleDateFormat ("yyyy-MM-dd HH:mm:ss"); String nowTime = format.format (new Date (msgCreatetime)). The above is all the content of the article "sample Analysis of CreateTime developed by Wechat". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!