It's time to play... "Decode This"
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 -- 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.
On 26 October 2012 00:55, Sean P. DeNigris <sean@clipperadams.com> 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.
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... -- View this message in context: http://forum.world.st/It-s-time-to-play-Decode-This-tp4652979p4652982.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
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 -- View this message in context: http://forum.world.st/It-s-time-to-play-Decode-This-tp4652979p4652989.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
participants (2)
-
Igor Stasenko -
Sean P. DeNigris