Skip to main content
Solved

Epoch time translation in 64 bit longs from USGS earthquakes

  • August 30, 2013
  • 2 replies
  • 34 views

kimo
Contributor
Forum|alt.badge.img+10
  • Contributor
  • 96 replies
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

Best answer by kimo

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.
This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

2 replies

kimo
Contributor
Forum|alt.badge.img+10
  • Author
  • Contributor
  • 96 replies
  • Best Answer
  • August 30, 2013
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.

Forum|alt.badge.img
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.