xspanger3770 / GlobalQuake

Experimental application for monitoring earthquakes world-wide in near real time. Capable of issuing its own earthquake early warnings (EEW).
MIT License
325 stars 49 forks source link

No available stations (timezone issue) #56

Closed magnanim0us closed 1 year ago

magnanim0us commented 1 year ago

Stations are all unavailable. When you start it (from command prompt), it says there are available stations but there is actually none. The stations were never available for me. Issue persists with both Windows and Ubuntu, on 0.9.0 and 0.9.1.

image image

xspanger3770 commented 1 year ago

Oh, that's really weird, I've never had this issue before. Seems like the station sources downloaded correctly but there might be some issue with connection to the seedlink networks. Can you show what's displayed in the seedlink networks tab and perhaps select the seedlink networks and hit update button?

xspanger3770 commented 1 year ago

Was thinking about what might have caused this issue, because the available stations got downloaded but somehow they didn't get included, and what I'm thinking about is a timezone issue, because when the stations get downloaded, they get filtered away when their delay is larger than 15 minutes, but if there is a timezone issue, it might actually filter all of them...

magnanim0us commented 1 year ago

Oh, that's really weird, I've never had this issue before. Seems like the station sources downloaded correctly but there might be some issue with connection to the seedlink networks. Can you show what's displayed in the seedlink networks tab and perhaps select the seedlink networks and hit update button?

I've already tried updating them all but that didn't really change anything. image

magnanim0us commented 1 year ago

Was thinking about what might have caused this issue, because the available stations got downloaded but somehow they didn't get included, and what I'm thinking about is a timezone issue, because when the stations get downloaded, they get filtered away when their delay is larger than 15 minutes, but if there is a timezone issue, it might actually filter all of them...

I've changed my timezone (to UTC) and it seems to work normally. As in the picture below it seems like only 4k of them are online; I'm assuming this has got to do with the fact that some stations do not have any seedlink. image

YacineBoussoufa commented 1 year ago

Switching to UTC broke everything for me, so UTC+2 is the solution I guess

xspanger3770 commented 1 year ago

Yeah that confirms that there is a timezone issue... thanks for reporting this! Will probably release a hotfix tomorrow as it might affect a lot of users...

xspanger3770 commented 1 year ago

The problem is in TimeFixer.java file: return TimeZone.getTimeZone("CET").getOffset(System.currentTimeMillis());

A code that I wrote maybe 4 years ago when I never thought about releasing GlobalQuake...

xspanger3770 commented 1 year ago

I added notices to readme and to the releases about this issue and will try to release a fix tomorrow when I'm back from a trip... Also @magnanim0us the 4k available stations is about what you can expect in version 0.9.1 as many stations indeed don't have any seedlink

xspanger3770 commented 1 year ago

Closed - hotfix in 0.9.2 by removing the delay check and correct handling will be added in 0.9.3.