Last active
October 23, 2015 05:32
-
-
Save mmasashi/ffae119b6abe5f687e36 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # decode_buf_timestamp('522bedf5152a281c') => 2015-10-23 05:27:49 UTC | |
| def decode_buf_timestamp(str) | |
| Time.at((str.to_i(16) >> 12) / (1000 * 1000)).utc | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment