Smartsite SXML CopyCode image Copy Code
{buffer.set(date, "1970-10-27T17:43:08+04:00")}
{buffer.set(universalDate, datetime.touniversaltime($date))}

<se:pagetranslations id="datehelper">
    <se:collection>
        <se:member name="displayinfo(d)">
{buffer.set(d, translation.arg(1))}
        
Date: {buffer.get(d)}
Is Local Time: {datetime.islocaltime($d)}
Is Universal Time: {datetime.isuniversaltime($d)}
Is Daylight Saving Time: {datetime.isdaylightsavingtime($d)}
Is Leap Year: {datetime.isleapyear(datetime.getyear($d))}
Is Today: {datetime.istoday($d)}
Is Unspecified Timezone: {datetime.isunspecifiedtimezone($d)}

        </se:member>
    </se:collection>
</se:pagetranslations>

{translation.datehelper.displayinfo($date)}
{translation.datehelper.displayinfo($universalDate)}
Example Result CopyCode image Copy Code
Date: 1970-10-27T17:43:08+04:00
Is Local Time: true
Is Universal Time: false
Is Daylight Saving Time: false
Is Leap Year: false
Is Today: false
Is Unspecified Timezone: false

Date: 1970-10-27T13:43:08
Is Local Time: false
Is Universal Time: true
Is Daylight Saving Time: false
Is Leap Year: false
Is Today: false
Is Unspecified Timezone: false