How to extract the time stamp from

If [my_time] is a string you can use mutate { gsub => [ "my_time", "Z$", "" ] }.