newlandsvalley / tunebank

RESTful server for tunes represented in the ABC notation
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

sort out epoch times properly #15

Closed newlandsvalley closed 4 years ago

newlandsvalley commented 4 years ago

I've just worked out how to do this properly in postgresql. i.e. how to convert a timestamp to an epoch time, returned as a string:

  select floor ( extract ( epoch from current_timestamp) * 1000) :: text;
newlandsvalley commented 4 years ago

Fixed by 25b283b94c1951f6139f65444bd727bd81c476de. The ts field is now generated properly from the database and is renamed from date to ts accordingly.