If the data are in a matrix, I would change it to a data frame to do the transformations. You can change it back to a matrix if you need the final object to be a matrix.
For the subtraction, do you need to subtract a single value from every value or is a different value used for every case?
library(dplyr)
#>
#> Attaching package: 'dplyr'
#> The following objects are masked from 'package:stats':
#>
#> filter, lag
#> The following objects are masked from 'package:base':
#>
#> intersect, setdiff, setequal, union
library(lubridate)
#>
#> Attaching package: 'lubridate'
#> The following objects are masked from 'package:base':
#>
#> date, intersect, setdiff, union
#Make data
VALS <- c('01 02:52:12','01 03:00:25','01 03:08:09','01 03:35:20',
'13 15:58:57','13 17:56:45','13 18:24:39','13 18:57:01',
'17 19:02:37','17 19:12:51','17 23:19:59','18 0:31:09',
'12 04:01:57','12 04:08:18','12 04:13:02','12 04:37:57')
MAT <- matrix(VALS, nrow = 4, byrow = TRUE)
MAT
#> [,1] [,2] [,3] [,4]
#> [1,] "01 02:52:12" "01 03:00:25" "01 03:08:09" "01 03:35:20"
#> [2,] "13 15:58:57" "13 17:56:45" "13 18:24:39" "13 18:57:01"
#> [3,] "17 19:02:37" "17 19:12:51" "17 23:19:59" "18 0:31:09"
#> [4,] "12 04:01:57" "12 04:08:18" "12 04:13:02" "12 04:37:57"
#Change to POSIXct
DF <- as.data.frame(MAT)
DF <- DF %>% mutate(across(.f = function(V) ymd_hms(paste0("2020/01/", V))))
DF
#> V1 V2 V3
#> 1 2020-01-01 02:52:12 2020-01-01 03:00:25 2020-01-01 03:08:09
#> 2 2020-01-13 15:58:57 2020-01-13 17:56:45 2020-01-13 18:24:39
#> 3 2020-01-17 19:02:37 2020-01-17 19:12:51 2020-01-17 23:19:59
#> 4 2020-01-12 04:01:57 2020-01-12 04:08:18 2020-01-12 04:13:02
#> V4
#> 1 2020-01-01 03:35:20
#> 2 2020-01-13 18:57:01
#> 3 2020-01-18 00:31:09
#> 4 2020-01-12 04:37:57
Created on 2021-02-11 by the reprex package (v0.3.0)