I have a Rest Service which receives a JSON object. This JSON has a timestamp value in it. When I convert the JSON object to Java class I use a long variable (which I later use with new Date(long) to get a proper date object) for the timestamp. Everything was working fine as the clients (in Java and JS) were sending timestamp as long.
Now we are adding a Python client to the service, and I am trying to send timestamp as long from Python. But time.time() method in Python always gives a floating point number. So I decided to use a double variable in my Rest Service's Java class and I am getting the timestamp correctly. But then how do I convert this to a Date Object. Any ideas?