Advertisement
Guest User

Untitled

a guest
Jun 26th, 2017
42
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. string time_to_uuid(int64_t the_time) {
  2. string ssUUID;
  3.  
  4. stringstream ss;
  5. ss << hex << ((time(NULL) * 10000) + 122192928000000000);
  6. ssUUID = ss.str();
  7.  
  8. ssUUID = ssUUID.substr(7,8) + "-" + ssUUID.substr(3,4) + "-0" + ssUUID.substr(0,3) + "-0000-000000000000";
  9.  
  10. return ssUUID;
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement