I use a function from here to calculate the sunrise and sunset and it returns:
sunrise sunset
6.49055593325792 18.2873900837081
I am struggling (trying with strftime, POSIXct or as.Date functions) to convert it to real time, but so far without success.
As always, any suggestion is greatly appreciated.
@Arun’s strategy works, but it might be easier to just do:
That will get you the seconds as well.