Traveling with a Mac Book
I recently returned from a trip to Europe (GMT+2) to the West Coast (PT). Upon returning I noticed that none of my Two-factor (MFA) codes were accepted by either Cloudflare or AWS. I had not restarted my MacBook since leaving Europe. It seems to me that the internal clock which is used to calculate the current MFA code is not reset when switching time zones, thus producing invalid codes. A restart of the computer fixed this issue. Update: I also noticed that this happens sometimes when the laptop is closed (asleep) for some period of time. I found this little command that synchronizes the time.