Commit d70a6d77 authored by Nastuzzi Samy's avatar Nastuzzi Samy
Browse files

Fix timestamp error

parent 454cbad8
......@@ -474,7 +474,10 @@ public class QRCodeReaderActivity extends BaseActivity implements ZXingScannerVi
}
protected void checkReservation(final API api, final ComedmusResponse comedmusResponse) {
if ((System.currentTimeMillis() / 1000) < comedmusResponse.getCreatedAt()) {
long currentTimestamp = (System.currentTimeMillis() / 1000);
Log.d(LOG_TAG, "Current time: " + currentTimestamp);
if (currentTimestamp < comedmusResponse.getCreatedAt()) {
runOnUiThread(new Runnable() {
@Override
public void run() {
......@@ -504,7 +507,7 @@ public class QRCodeReaderActivity extends BaseActivity implements ZXingScannerVi
return;
}
if ((System.currentTimeMillis() / 1000) > comedmusResponse.getExpiresAt()) {
if (currentTimestamp > comedmusResponse.getExpiresAt()) {
runOnUiThread(new Runnable() {
@Override
public void run() {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment