Created
          April 6, 2017 09:45 
        
      - 
      
- 
        Save jwoschitz/ef190951d4aadd71fd0a344a76f1d9c5 to your computer and use it in GitHub Desktop. 
    Create artificial mongodb ObjectId for a given timestamp
  
        
  
    
      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
    
  
  
    
  | print(ObjectId(Math.floor(ISODate("2015-05-07T11:00:00.000Z")/1000).toString(16) + "0000000000000000")) | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment