Introduction to WeChat developmentCreateTime

零下一度
Release: 2017-05-27 13:44:04
Original
3875 people have browsed it

This article is an introduction to CreateTime developed by WeChat. The following is the code. Let me share with you

Createtime in WeChat is expressed as the number of seconds between 0:00:00 on January 1, 1970 and the time when the message was created. There are two ways to obtain Createtime:

 long createtime = System.currentTimeMillis(); 
  
 long createtime = new java.util.Date().getTime();
Copy after login

The way to convert createtime to the current time is:

 long msgCreatetime  = Long.pareseLong(createtime)*1000L; 
 DateFormate format= new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); 
 String nowTime = format.format(new Date(msgCreatetime));
Copy after login

[Related recommendations]

1. WeChat public account platform source code download

2. WeChat public account development--analysis of CreateTime

3. WeChat payment for WeChat development

The above is the detailed content of Introduction to WeChat developmentCreateTime. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template