Aliasdateformat does not work for time

&aliasdateformat=`%Y%-m-%d-%T`

does not work for time in my code:

[[!NewsPublisher@natuursteenzoeken?
...other fields....
&aliastitle=`0`
&aliasprefix=`steen`
&aliasdateformat=`%Y%-m-%d-%T`

This generates an alias of:

steen2023-11-30-utc

%T does not give result like listed here: Date Formats - Tag Syntax | MODX Documentation

I tired other like minute and second also, don’t work.

Not sure if this is related but the php function strftime is deprecated since PHP 8.1. If NewsPublisher is using this under the hood, this might be the cause? Just a wild guess though, see this thread for reference.

It looks like the code uses the PHP function date() to create the formatted date (and not strftime())

So you have to use the appropriate format.
Something like this:

&aliasdateformat=`Y-m-d-H:i:s`
1 Like

Thanks! that was it.

This topic was automatically closed 2 days after discussion ended and a solution was marked. New replies are no longer allowed. You can open a new topic by clicking the link icon below the original post or solution and selecting “+ New Topic”.