Fixed datetime implementation