houseabsolute / DateTime-TimeZone

Time zone object base class and factory
https://metacpan.org/release/DateTime-TimeZone/
Other
9 stars 25 forks source link

Q: Why timezone is not shown when object is stringified? #30

Closed KES777 closed 5 years ago

KES777 commented 5 years ago

my Object is:

    internals: {
        formatter         undef,
        local_c           {
            day              13,
            day_of_quarter   13,
            day_of_week      5,
            day_of_year      194,
            hour             11,
            minute           56,
            month            7,
            quarter          3,
            second           45,
            year             2018
        },
        local_rd_days     736888,
        local_rd_secs     43005,
        locale            DateTime::Locale::FromData,
        offset_modifier   0,
        rd_nanosecs       0,
        tz                DateTime::TimeZone::Europe::Zaporozhye,
        utc_rd_days       736888,
        utc_rd_secs       32205,
        utc_year          2019
    }

but the stringification is: 2018-07-13T11:56:45

Why it is not 2018-07-13T11:56:45+03? how to force this?

autarch commented 5 years ago

Take a look at the formatter option to the constructor - https://metacpan.org/pod/DateTime#DateTime-%3Enew(-...-)