in reply to Re^4: Yesterday's date
in thread Yesterday's date

This is because Time::Piece doesn't care as much about timezones and DST.

Precisely so. That's another good reason to use it in this sort of scenario where DST is a hindrance at best. I don't see why, given a problem where DST and timezones would only complicate things, the user would choose a non-core module where these are important over a core module which for the most part ignores them.

For the general audience reading this, if you are used to DateTime or Date::Calc or any of the myriad other modules, I do recommend that you become at least passingly familiar with Time::Piece. It is pretty simple, fairly lightweight and core. It won't solve all problems but it handles a good subset of them, including the one in this thread, very well indeed.


🦛

Replies are listed 'Best First'.
Re^6: Yesterday's date
by ikegami (Patriarch) on May 31, 2023 at 14:56 UTC

    Hold on now. It's just as easy to use UTC with non-core modules as it is with Time::Piece. It's the default time zone for the DateTime module too, for example.

    While it is lightweight, it's not any better at handling dates. (And one could say it's worse, because of the piss-poor interface.)