~jasmuth/mgo/skj-mgo-bson

« back to all changes in this revision

Viewing changes to bson/bson.go

  • Committer: John Asmuth
  • Date: 2012-07-11 21:14:05 UTC
  • Revision ID: jasmuth@gmail.com-20120711211405-qoj6bb03vnks5v57
added Encoder and Decoder types, and a test

Show diffs side-by-side

added added

removed removed

Lines of Context:
294
294
// why this function exists. Using the time.Now function also works fine
295
295
// otherwise.
296
296
func Now() time.Time {
297
 
        return time.Unix(0, time.Now().UnixNano() / 1e6 * 1e6)
 
297
        return time.Unix(0, time.Now().UnixNano()/1e6*1e6)
298
298
}
299
299
 
300
300
// MongoTimestamp is a special internal type used by MongoDB that for some