Get the App
SLTechnology News&Howtos  ›  Development  › 

Example Analysis of CreateTime developed by Wechat

Shulou Source: shulou.com Published: 2022-06-03 15:41:44 11月14日 Update

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!

Tags: Articles examples analysis development content methods not much most of the time more news knowledge industry information information channels channels references learning help Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Linux Shulou Information Shulou Tech Info MariaDB NVidia