Subject: | I propose format_datetime should use the time_zone parameter |
I don't really think it makes sense for format_datetime to pass through to strftime on the DT object, because this completely ignores the fact the formatter has a time zone on it.
To my mind, the whole point of the formatter having a time zone is that it will convert $timezone <-> UTC.
Now, the output of parse_datetime is actually a DateTime object that knows it is $timezone, but that seems to me to be functionally equivalent to a UTC object - it's normalised data with sufficient metadata to be converted to any unit.
It seems sensible that if the formatter has a time zone specified, the user would want any strings formatted with it to be output based on that time zone. I would argue that is the whole point in the formatter: a container for the metadata required to convert the normalised DateTime object into a representation for output.
Currently, it seems to violate POLA.