• Rainer Grabowski

    Hi Derek,

    that is a known issue. If no time value is entered Podio sets the time to 00:00 UTC but returns it in calculation field according to the timezone you set in your Podio account. This is annoying and and I don't know the technical reason for it either. But I created a piece of code that fixes this issue. It's a bit cumbersome but it works: 

    var d = @Your Date Field;
    var tz = "Europe/Berlin";
    var gmt = moment(d).tz(tz).format("ZZ");
    var gmtDiff = parseFloat(gmt)/100;
    var gmtDiff = Number(String(gmtDiff).replace(".3",".5"));
    var timeStamp0000 = moment(d).format("HH:mm") == "00:00" ? moment(d) : moment(d).add(gmtDiff,"h");
    var timeStampOwnTZ = timeStamp0000.toString().split("GMT").shift() + "GMT " + gmt;
    var asStringFormatted = moment(timeStamp0000).format("DD.MM.YYYY HH:mm");
    var asDate = moment(timeStampOwnTZ).tz(tz).toDate();

    var tz should be your timezone ("Europe/Berlin" is my timezone).
    var asStringFormatted isn't necessary if you want to display the result as a date. It can be used if you need the output as a string with the correct date or date/time for a given timezone. For example if you need it for  PWA where you can't set timezones.  


    Comment actions Permalink
  • Mary Ann Toms Entoma

    Hi Rainer,

    When I did that at first, referencing the date field the problem is still existing, because the source "date field" is not updating accurately even with calculation.  Here's how I resolved it, please refer to this link:

    Comment actions Permalink

Please sign in to leave a comment.

Powered by Zendesk