Friedrich Ewald My Personal Website

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.

sudo sntp -sS time.apple.com


About the author

is an experienced Software Engineer with a Master's degree in Computer Science. He started this website in late 2015, mostly as a digital business card. He is interested in Go, Python, Ruby, SQL- and NoSQL-databases, machine learning and AI and is experienced in building scalable, distributed systems and micro-services at multiple larger and smaller companies.