Subject: | Timezone needs to be an option |
Quote: "Given a value of the appropriate type, this method will return a new DateTime object. The time zone for this object will always be the floating time zone, because by MySQL stores the local datetime, not UTC"
This is fully true, but also this is only the default case. If you happen to have to develop a website with i18n you will most likely fall back to using UTC (also see: http://stackoverflow.com/a/19069310/567193) and converting the times inside perl itself.
Therefor it would be nice to be able to passthrough a timezone like this:
my $dt = DateTime::Format::MySQL->parse_datetime( '2003-01-16 23:12:01', 'UTC' );
which will default to floating.
Would be glad to commit the changes.
--
http://www.perlhipster.com