datetime/today() populates tomorrow date at some time of day

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • deepsinghal29@gmail.com
    Junior Member
    • Jan 2024
    • 26

    datetime/today() populates tomorrow date at some time of day

    We have a date field and is populated via before save script to datetime/today(). At around 10:43 pm EST (or near time and after), when the script is triggered, the date field is updated to TOMORROW instead of TODAY. The modified date/time correctly shows as Today10:43 pm. The user and the system time zone is set to EST(New York time zone).
  • yuri
    Member
    • Mar 2014
    • 8440

    #2
    The function returns UTC today. Maybe we need to change it to honor a time-zone but it would be in a minor release I think.

    As a workaround you can use datetime\now(), then convert to a timezone, then split the date part.
    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

    • deepsinghal29@gmail.com
      Junior Member
      • Jan 2024
      • 26

      #3
      thanks will try that.

      Comment

      Working...