time is now reset when switching the app from background to foreground