edit sleep functionality

small bug yet to be fixed: time difference on diary page doesn't change
after edits