Medic-logs connected_users is showing dates in 2051

What can explain a user with a connected_users timestmamp in the year 2051?

I’m seeing many users with such timestamps for a production instance and curious what this might mean? I believe this is a server-side timestamp, so would it mean that the server’s system time was set to 2051 at some point?

https://migori-echis.health.go.ke/medic-logs/_design/logs/_view/connected_users?reduce=false

Yes, that’s the only explanation, I’m afraid.

If you look at the _changes endpoint, which will show you changes in rough order, you’ll see a cluster of these docs getting pushed in the first quarter of the changes feed:

https://migori-echis.health.go.ke/medic-logs/_changes

So this problem likely resolved, because if I check the latest connected user logs (last ones in the changes feed), they have relatively correct dates.

These faulty records should be deleted, because of the way we update the connected user log: cht-core/api/src/services/connected-user-log.js at 17c030772311289e1a7a192784c7bedf4efb9655 · medic/cht-core · GitHub by comparing the current date with the last reported date - we require the new date to be at least 30 minutes AFTER previous date (the 2051 one).

1 Like