use strict; use YAML::Any; use DateTime; my $dt = DateTime->new( year => 1964, month => 10, day => 16, hour => 16, minute => 12, second => 47, nanosecond => 500000000, time_zone => 'Asia/Taipei', ); print Dump($dt); #### --- !!perl/hash:DateTime formatter: ~ local_c: day: 16 day_of_quarter: 16 day_of_week: 5 day_of_year: 290 hour: 16 minute: 12 month: 10 quarter: 4 second: 47 year: 1964 local_rd_days: 717260 local_rd_secs: 58367 locale: !!perl/hash:DateTime::Locale::en_US default_date_format_length: medium default_time_format_length: medium en_complete_name: English United States en_language: English en_territory: United States id: en_US native_complete_name: English United States native_language: English native_territory: United States offset_modifier: 0 rd_nanosecs: 500000000 tz: !!perl/hash:DateTime::TimeZone::Asia::Taipei is_olson: 1 max_year: 2018 name: Asia/Taipei spans: - - -1.#INF - 59800434840 - -1.#INF - 59800464000 - 29160 - 0 - LMT - - 59800434840 - 61357104000 - 59800463640 - 61357132800 - 28800 - 0 - CT - - (... SNIP ...) - - 62474770800 - 1.#INF - 62474799600 - 1.#INF - 28800 - 0 - CST utc_rd_days: 717260 utc_rd_secs: 29567 utc_year: 1965