Fix time zone dependent issue for attribute type set by cropping milliseconds.