Formula does not take locale for dates

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • diyoyo
    Member
    • Jul 2018
    • 88

    Formula does not take locale for dates

    Hi,
    I tried doing a very simple formula as follows:

    Code:
    ifThen(name=null, name=createdAt);
    But when I do this, the name has 2 hours time shift compared to the Created At field when displayed in the page.

    I also tried
    Code:
    datetime\format(createdAt)
    without success.

    Thanks for taking care of this.
    Best,
  • yuri
    Member
    • Mar 2014
    • 8511

    #2
    Unlikely to be a bug. Check timezone in your Settings (not preferences).
    If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

    Comment

    • diyoyo
      Member
      • Jul 2018
      • 88

      #3
      Hi,
      I already checked, and settings are correct, and I even checked that Settings parameters are the same as Preferences parameters, just to make sure.
      Regardless of this, don't you think date should be consistent on the same page?
      I mean here is what I get (on the same page!) using the above formula:
      Click image for larger version

Name:	YoyoMac.Screenshot 2021-04-15 at 20.50.37.png
Views:	317
Size:	6.2 KB
ID:	69694Click image for larger version

Name:	YoyoMac.Screenshot 2021-04-15 at 20.51.08.png
Views:	299
Size:	6.1 KB
ID:	69695

      Don't you think this is a real bug?
      Cheers,

      Comment

      • yuri
        Member
        • Mar 2014
        • 8511

        #4
        Hi,

        I checked and it worked properly. It applied the system timezone and I had the same dates in name and created fields.
        If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

        Comment

        • diyoyo
          Member
          • Jul 2018
          • 88

          #5
          Hi, I don't know how to help you recreate this bug, but clearly, as shown in the screenshot, that's not my case. I'll investigate it further and let you know.

          Comment

          Working...