Hi, everyone.
I recently ran into an issue with BrightScript when trying to get the timestamp in milliseconds. I use this (hack)function to get the value:
ToMilliseconds = Function(time)
timestamp = time.AsSeconds()
ms = time.GetMilliseconds()
timestampString = timestamp.ToStr() + ms.ToStr()
low = timestampString.Mid(timestampString.Len() - 9, 9).ToInt()
high = timestampString.Mid(0, timestampString.Len() - 9).ToInt()
output# = high
output# = output# * 1000000000
output# = output# + low
return output#
End Function
But now I've encountered a problem when I try to convert this value to JSONstring.
Basically, I need a value that looks like "1438866985492", but I get "1.438867e+12". If anyone could help me with this issue I would be so happy