I sign web requests and as part of the query string, I need to include oauth_timestamp=123456789
, where 123456789
is the nominal time from 1970-01-01 00:00 UTC.
I used POSIXTime for my view, which is just an alias of type NominalDiffTime .
I am having problems when I want to convert POSIXTime / NominalDiffTime to Text so that I can add it to the collection of query string elements.
The problem is that the constructor for NominalDiffTime is private, and therefore I cannot extract the actual number.
Even the hacky way to use show
will add an "s" generating 123456789s
.
Is there an easy way to extract the actual number from NominalDiffTime?
source share