WhatsApp消息提醒
二、下面是java代码
import java.text.Parswhatsapp 扫描二维码eException;
import java.text.SimpleDateFormat;
import javwhatsapp扫码加入群a.util.Date;
public class Baidu {
/**
* @param args
*/
public static void main(String[] args) {
try {
String time = "2011/07/29 14:怎样加whatsapp好友50:11";
Date date = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss").parse(time);
long unixTimestamp = date.getTime()/1000;
System.out.println(unixTimestamp);
} catch (ParseException e) {
e.printStackTrace();
}
}whatsapp 登陆别的手机再登陆回来还有信息嘛
}
将UNIX时间转为UTC+8 即北京时间
String dateString = "2011/07/29 14:50:11";
Date date = df.parse(dateString);
long=date.getTime();
{
static unsigned int month[12]={
/*01月*/xDAY*(0),
/*02月*/xDAwhatsapp好友Y*(31whatsapp通讯录和聊天记录备份),
/*03月*/xDAY*(31+2whatsapp群发功能8),
/*04月*/xDAY*(31+28+31),
/*05月*/xDAY*(31+28+31+30),
/*06月*/xDAY*(31+28+31+30+31),
/*07月*/xDAY*(31+28+31+30+31+30),
/*08月*/xDAY*(31+28+31+30+31+30+31),
/*09月*/xDAY*(31+28+31+30+31+30+31+31),
/*10月*/xDAY*(31+28+31+30+31+30+31+31+30),
/*11月*/xDAY*(31+28+31+30+31+30+31+31+30+31),
/*12月*/xDAY*(31+28+31+30+31+30+31+31+30+31+30)
};
unsigned inwhatsapp 国际漫游t seconds = 0;
whatapp网页版注册账号被封 unsigned int year = 0;
year = time->year-1970;//不whatapp网页版多开防封考虑2100年千年虫问题
seconds = xYwhatapp网页版接收语音验证码EAR*year + xDAY*((year+1)/4); //前几年过去的秒数
seconds += month[time->month-1]; //加上今年本月过去的秒数
if( (time->monthwhatsapp下载安装 中国 > 2) && (((year+2)%4)==0) )//2008年为闰年
seconds += xDAY;//闰年加1天秒数
seconds += xDAY*(time->day-1); //加上本天过去的秒数
seconwhatapp网页版ds += xHOUR*time->hour;//加上本小时过去的秒数
seconds += xMINUTE*time->minute;//加上本分钟过去的秒数
seconds += time->second;//加上当前秒数 seconds -= 8 * xHOUR;
retu安装whatsapp最新版本rn seconds;
}
WhatsApp网页版请注明:WhatsApp网页版 » whatsapp消息提醒 unix时间戳转换为日期用的是什么算法