Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
PHP と Java(Android) でタイムスタンプを生成しようとしています。どちらも同じである必要があります。しかし、タイムスタンプ間に 3000 以上の差があります。以下のコードをチェックしてください!
ジャワ:
long unixTime = System.currentTimeMillis() / 1000L;
PHP :
$time2 = time();
System.currentTimeMillis() は、モバイルと java.util.Date(); で現在の時刻を取得します。GMT に基づいて取得します。解決しました。