Announcement

Collapse
No announcement yet.

Is there a bug in Date dynamic logic again?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Is there a bug in Date dynamic logic again?

    Hi team,

    I would like to ask a question:

    My current setting:
    Ubuntu Timezone: Asia/Ho_Chi_Minh (Current date at this moment: July 16th 2024)
    Espocrm Timezone: Asia/Ho_Chi_Minh

    1. I created a field called "at Date" with conditions like below - I want to filled in date of today or in the past, not in the future.
    Click image for larger version

Name:	image.png
Views:	93
Size:	30.1 KB
ID:	108452
    2. When I try to create a test record with default value of "at Date" field, I got this error message:

    Click image for larger version

Name:	image.png
Views:	128
Size:	13.8 KB
ID:	108451

    Could you pls let me know if I did create wrong condition for making field invalid.​

    Thank you so much.

  • #2
    Hi,

    I think it has been always working this way, interpreted a date value as a UTC 00:00. I will fix it in the next release.

    Comment


    • trungtvmso
      trungtvmso commented
      Editing a comment
      Wow, Yuri, you are the best. So my condition setting is completly correct. Am I right?

  • #3
    I don't use Data Validation often so I can't help you. But looking at that screenshot, I dont see why there is a Data Validation error. You should be able to use any date isn't it? So something else is causing the validation error? Like a " space " or MM/DD or DD/MM date writing.
    Click image for larger version  Name:	image.png Views:	0 Size:	2.5 KB ID:	108499

    Comment


    • #4
      Originally posted by espcrm View Post
      I don't use Data Validation often so I can't help you. But looking at that screenshot, I dont see why there is a Data Validation error. You should be able to use any date isn't it? So something else is causing the validation error? Like a " space " or MM/DD or DD/MM date writing.
      Click image for larger version Name:	image.png Views:	0 Size:	2.5 KB ID:	108499
      I've set to validate the date value to be input should be exactly TODAY or before TODAY. So if anyone tries to select the date after TODAY (in the future), UI will send invalid field value alert.

      But the issue here I think it's been related to timezone between ESPOCRM UTC timezone and setting timezone (My current setting timezone is GMT+7).

      So when my timezone change to new day but actually ESPOCRM backend timezone (UTC-0) still in the last day.

      For example:
      My time: 00:01 => UTC_0 time: 18:00/19:00
      My date: 18 Jul 2024 => UTC_0 date: 17 Jul 2024

      And the validation in this condition is comparing my date with UTC 0 date instead of convert my date (GMT+7) into UTC 0 then doing an comparison.

      Very sorry if you are feeling difficult because of my limitation in writing english. I'm still improving my language skill
      Last edited by trungtvmso; 07-18-2024, 01:37 PM.

      Comment


      • esforim
        esforim commented
        Editing a comment
        I understand what you trying to say. I think you just need to wait till Yuri fix it. Or keep eye on Github and patch the fix until next version is release.
    Working...
    X