Fix timestamp handling to work regardless of local timezone.