CNG/mt-plugin-order — comment on commit 679451a60d89259b1638e2d0ca1cf330e363a21a
File:  line 0
By markpasc:

@CNG, hmm, that should work, but since you want to reuse the `Date` tag's behavior (per your note about future bugs), it might be better to call into the existing implementation instead. That will also leave the other `Date` attributes like `mail` compatible with whatever version of MT/Melody is installed, without any work or future upkeep on our part. You need only make sure that `$args->{utc}` is `0` before you pass in to the other implementation. And it's probably better to complain when someone tries to use it that way, instead of letting them flail around trying to figure out why their `utc="1"` won't work. (Otherwise you could `local $args->{utc} = 0` to ignore it while calling into the context's implementation.)

sub _hdlr_order_date {
my ($ctx, $args) = @_;
# Order dates are already UTC (or at least shouldn't be messed with after ordering).
if ($args->{utc}) {
my $tag = $ctx->stash('tag');
return $ctx->error(qq{The MT$tag doesn't support utc="1": items were already ordered by these dates, so can't re-adjust them for UTC after the fact});
}
return $ctx->_hdlr_date($args);
}

(Although they're in `ContextHandlers.pm`, the built-in tag handlers are declared in the `MT::Template::Context` package, so they end up being methods of our `$ctx` instance of `MT::Template::Context`—so you should be able to call it as `$ctx->_hdlr_date` like that.)

If that makes sense, once that's fixed send a pull request and I'll merge your changes in!