JeffreySarnoff/TimesDates.jl

Make `DateTime(::TimeDate)` and `ZonedDateTime(::TimeDateZone)`

omus opened this issue · 2 comments

omus commented

You could simplify and reduce duplicate code if you made the following functions:

DateTime(::TimeDate)
ZonedDateTime(::TimeDateZone)

For example you could use ZonedDateTime(::TimeDateZone) to remove several lines from your astimezone:

fast_time = fasttime(at_time)
slow_time = at_time - fast_time
in_zone = x.in_zone
zdt = ZonedDateTime(on_date+slow_time, in_zone)

thanks

followed