Using the Users API it's currently not possible to set a custom-field such as LastSeenTime to a string value that is a valid DateTime e.g.
2024-04-01T12:38:47Z
or even just
2024-04-01 12:38:47
is rejected and an empty string is stored for the use instead.
Any invalid date stores correctly e.g.
2024-03-99T12:38:47Z
As do just dates or times.
However, there's a work around which is to add a prefix or suffix to store a DateTime.