The data was passed around as a string for some reason, which led to time precision loss and wrong dates being displayed. Simply pass the time as is to fix that.