This converts the character vector into Date objects, from which you can use format
library(lubridate)
#>
#> Attaching package: 'lubridate'
#> The following objects are masked from 'package:base':
#>
#> date, intersect, setdiff, union
the_times <- c("0s", "300s (~5 minutes)",
"600s (~10 minutes)",
"900s (~15 minutes)",
"14400s (~4 hours)",
"14700s (~4.08 hours)",
"15000s (~4.17 hours)",
"15300s (~4.25 hours)")
begin <- Sys.Date()
(the_seconds <- as.numeric(gsub("s.*$","",the_times)))
#> [1] 0 300 600 900 14400 14700 15000 15300
full_datetimes <- (begin + seconds(the_seconds))
format(full_datetimes, format = "%H:%M:%S")
#> [1] "00:00:00" "00:05:00" "00:10:00" "00:15:00" "04:00:00" "04:05:00" "04:10:00"
#> [8] "04:15:00"
Created on 2023-03-15 with reprex v2.0.2