Email or username:

Password:

Forgot your password?
Top-level
Maksim Odnoletkov

@nikitonsky to show relative time like that you need to compare local and remote times – that would not work when local time is way off

5 comments
Niki Tonsky

@odnoletkov way off from what? It’s just local time!

Maksim Odnoletkov

@nikitonsky your `System.currentTimeMillis` is off by 1hr. You have `post.timestamp` which is correct. How do you render label like 'posted 5 min ago' properly?

Niki Tonsky

@odnoletkov No, System.currentTimeMillis is never off by an hour, regardless of timezone. In fact, it doesn’t even change when you change time zones

Maksim Odnoletkov

@nikitonsky see original scenario: "user fixes by adjusting system time manually"

Niki Tonsky

@odnoletkov Oh, yeah, but then HTTPS won’t work, so all good

Go Up