Can I confirm if this is correct format for the custom macro?
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using CMS.MacroEngine;
using CMS.Helpers;
/// <summary>
/// Unix time method
/// </summary>
public static class unixtimestamp
{
public static string unixtime(DateTimeOffset)
{
DateTimeOffset.UtcNow.ToUnixTimeSeconds();
}
}
I am not a coder, but seems like custom macros are required a lot, so trying to understand the logic now.