Before I write this up as a bug, per the instructions, I thought I'd check here. This is really about the MySQL connector.
TIME, as a database field, represents not a date, but an amount of time (elapsed time, etc). We are using it to record the duration of a medical event.
However, when building an Angular client (by hand due to the absolutely absurd SDK issues), I noticed Loopback converts this to a Date. That wouldn't be so bad, IF it was a valid date, and consisted of the amount of seconds or milliseconds since midnight or something.
This almost seems to work, for example, 4 seconds ends up being '0000-00-00 00:00:04'
If I try to convert that to say seconds, I get an error:
{{camDetection.recDuration | date: 'hh:mm:ss'}}
ERROR Error: "InvalidPipeArgument: 'Unable to convert "0000-00-00 00:00:04" into a date' for pipe 'DatePipe'"
I mean, all I want it to do is display the last four digits. I realize I could build a custom pipe to do it, but it looks to me like something is fundamentally wrong with the time to date conversion.
I also tried the ngx-moment module, but it always says "A few seconds" even for 4 minute incidents. We really could use the exact time.
Can anyone help?
== John ==