It's time to play... "Decode This"

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

It's time to play... "Decode This"

Sean P. DeNigris
Administrator
A REST API passed me #[0 0 1 58 153 199 12 211], which it swears is a unix timestamp within the last day... I don't see how that's possible... Any ideas?

Thanks,
Sean
Cheers,
Sean
Reply | Threaded
Open this post in threaded view
|

Re: It's time to play... "Decode This"

Igor Stasenko
On 26 October 2012 00:55, Sean P. DeNigris <[hidden email]> wrote:
> A REST API passed me #[0 0 1 58 153 199 12 211], which it swears is a unix
> timestamp within the last day... I don't see how that's possible... Any
> ideas?
>
looks like 64-bit value, which fits the size of time_t (which some ppl
refer as unix timestamp)


> Thanks,
> Sean
>
>
>
> --
> View this message in context: http://forum.world.st/It-s-time-to-play-Decode-This-tp4652979.html
> Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
>



--
Best regards,
Igor Stasenko.

Reply | Threaded
Open this post in threaded view
|

Re: It's time to play... "Decode This"

Sean P. DeNigris
Administrator
Igor Stasenko wrote
looks like 64-bit value, which fits the size of time_t (which some ppl
refer as unix timestamp)
Googling now... it's really strange... if I send #asInteger, it looks *really* like a unix timestamp, but shifted 2 to the left...
Cheers,
Sean
Reply | Threaded
Open this post in threaded view
|

Re: It's time to play... "Decode This"

Sean P. DeNigris
Administrator
In reply to this post by Sean P. DeNigris
Sean P. DeNigris wrote
A REST API passed me #[0 0 1 58 153 199 12 211], which it swears is a unix timestamp
My bad. I RTFM, but not so well "time in *milliseconds* from 00:00:00 UTC on January 1, 1970", so I have to do something like:

DateAndTime fromUnixTime: #[0 0 1 58 153 199 12 211] asInteger / 1000.

Obviously need to stop hacking for today ;)

Cheers,
Sean
Cheers,
Sean