Skip to main content
The USGS have deprecated their earthquake feed in GeoRSS and replaced it with a GeoJSON. No problem I thought, in fact better - but wait.

 

 

The timestamp of the earthquake is now provided as a long integer in milliseconds from the Epoch. Milliseconds?

 

I can see the intent, but the usual standard is whole seconds, and only whole seconds are  supported in the DateFormatter.

 

 

The trouble is that I cannot divide the time by 1000 for the DateFormatter because it is a 64 bit long and it seems that 32bit FME cannot handle it.

 

 

I have tried to treat it as a string, but that does not work either.

 

Maybe a PythonCaller, but can I pass it across?

 

 

Here is the feed URI

 

http://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/2.5_month.geojson
A second attempt has got the time as a string converted. I used a regular expression inside AttributeCreator to chop off the last 3 digits.
A second attempt has got the time as a string converted. I used a regular expression inside AttributeCreator to chop off the last 3 digits.

I too am wrestling with this sub-standard conversion. it would be nice if Safe would add it to the DateTimeConverter as an input format.

I have used this [((((E2/1000)/60)/60)/24)+DATE(1970,1,1)]in excel But then noticed that some of the events that have already occurred will happen in the future. so it i suspect it is not calculating with the 1970/1/1 correctly. I am still trying to fix this. If anyone has a solution please help.


Reply