Hi During Upgrade, I have got many error for EE2 add-ons and I need to replace that with alternate add-ons or remove those. Now, I face a problem, which I can’t solver, can anyone help?
I am retrieving 1 year previous date from current date with PHP code as below:-
$current_time = $this->EE->localize->decode_date('%Y-%m-%d %H:%i', $this->EE->localize->now - 604800);Its worked well in EE2, but in EE3, its showing Fatal error: Call to a member function decode_date() on a non-object in /home/mercator/public_html/system/ee/legacy/libraries/Functions.php(680) : eval()’d code on line 1, how can I fix that?
Sounds like you are coming from a very very old version. Localization changes in v2.6.0 refactored some of those methods. While this eliminated DST issues, it was before we adopted semver, so I apologize for that code incompatibility.
Localize::decode_date, use Localize::format_date instead.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.