0 users online. Create an account or sign in to join them.Users

Search

Is this possible to get seconds in $current-time param and in standard date/time field? By default time is always in hh:mm format.

It’s possible with the Global Param Loader extension by carsten.

alt text

  • Set the parameter name to current-time-seconds.
  • Set the parameter value to return(date('H:i:s'));

thanks, but what about standard date field? Is there are any date field extension that output time with seconds?

I'd like to know if this has been resolved too. It outputs hh:mm 00:00:00 but the seconds is always set to 00. Bug?

Please don't cross post. And please see my answer over there.

Hi all,

It seem I have a similar bug:

<created iso="2016-12-15T13:10:17+01:00" timestamp="1481803817" time="13:10" weekday="4" offset="+0100">2016-12-15</created>

@time doesn't reflect the 17s in iso format, but the manifest/config.php file contains

'region' => array(
    'time_format' => 'H:i:s',
    'date_format' => 'd/m/Y',
    'datetime_separator' => ' ',
    'timezone' => 'Europe/Paris',
),

Will try to parse the iso to get the s, but it could be great to return it in @time

If someone needs to extract seconds from iso format you can do it this way :

<xsl:value-of select="substring(path/to/date/@iso,18,2)" />

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.1
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details