File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change 34
34
$ receipts ->insertOne ([
35
35
'account_id ' => $ accountId ,
36
36
'description ' => $ summary ,
37
- 'timestamp ' => new MongoDB \BSON \UTCDateTime ((new DateTime ())->getTimestamp ()*1000 ),
38
- ], ['session ' => $ session ]);
37
+ 'timestamp ' => new MongoDB \BSON \UTCDateTime (),
38
+ ],
39
+ ['session ' => $ session ]);
39
40
40
- echo 'Successfully performed transaction!\n ' ;
41
+ echo 'Successfully performed transaction! ' , "\n" ;
41
42
};
42
43
// end-callback
43
44
47
48
try {
48
49
MongoDB \with_transaction ($ session , $ callback );
49
50
} catch (Exception $ e ) {
50
- echo 'Caught exception: ' , $ e ->getMessage (), ' \n ' ;
51
+ echo 'Caught exception: ' , $ e ->getMessage (), "\n" ;
51
52
}
52
53
// end-txn
Original file line number Diff line number Diff line change @@ -124,7 +124,7 @@ completes the following actions:
124
124
:language: console
125
125
:visible: false
126
126
127
- Successfully committed transaction!
127
+ Successfully performed transaction!
128
128
129
129
Additional Information
130
130
----------------------
You can’t perform that action at this time.
0 commit comments