Little issue with Duration field

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • item
    Active Community Member
    • Mar 2017
    • 1476

    Little issue with Duration field

    Hi Yuri,

    on demo too :
    on ours instance : 8.4.2

    when create a meeting... set a dateStart... set a dateEnd. => duration sample 1h

    Now, change dateEnd by one day... after (it's seemts sunday) .. duration become sample : 7d 2h
    see print-screen of demo
    same in Call.

    I have look in code but out of my skill. (library ?)

    I know, we can not have a long periode of meeting/call so maybe considere this as not a issue

    Best Regards

    If you could give the project a star on GitHub. EspoCrm believe our work truly deserves more recognition. Thanks.​
  • yuri
    Member
    • Mar 2014
    • 8438

    #2
    I'm not sure I understand. I think it's not a bug. It's how it have to work.
    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

    • ThomasB
      Senior Member
      • Mar 2022
      • 163

      #3
      Yeah, there is something strange going on.
      Tested this with create call.

      Date: 17.10.2024 - 26.10.2024
      Time: 02.00 -> 03.00
      Duration: 9D 1h

      Date: 17.10.2024 - 27.10.2024
      Time: 02.00 -> 03.00
      Duration: 10D 2h​

      Date: 17.10.2024 - 26.10.2024
      Time: 12.00 -> 13.00
      Duration: 9D 1h

      Date: 17.10.2024 - 27.10.2024
      Time: 12.00 -> 13.00
      Duration: 10D 3h​​

      The calculated duration of 9D 1h is correct. But if you just extend the range by a whole day it adds one or two hours to the duration.

      EspoCRM Version 8.4.0​
      Last edited by ThomasB; 10-17-2024, 10:56 AM.

      Comment

      • yuri
        Member
        • Mar 2014
        • 8438

        #4
        It's correct with 1h as DST ends these days. No idea about 2h and more. Maybe some bug.

        Anyone can help with fix? I have dozens of issues every day and free help on the forum that I really tired of and maybe should have ended to provide.
        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


        • crmscot
          crmscot commented
          Editing a comment
          yuri - espocrm is a fantastic product and the support provided by you, the team and the forum members is unsurpassed. You first helped me with a query in 2014 and I've been using the product since then. I'm sure I speak for users everywhere who immensely value your knowledgeable input on a daily basis and would really miss that, but would understand if you need to take a step back to focus on development. ???
      • yuri
        Member
        • Mar 2014
        • 8438

        #5
        I figured out.

        With +1h extra it was correct as I stated. Because we have an extra hour in night when DST ends.
        With +2h extra hour it was a bug. Fix: https://github.com/espocrm/espocrm/c...c684fbdef9728d
        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


        • Kharg
          Kharg commented
          Editing a comment
          Super Yuri ?
      • ThomasB
        Senior Member
        • Mar 2022
        • 163

        #6
        item 1h is correct because of day light saving change:

        The time change happens at 3 am on 27 October 2024. Then, Daylight Saving Time ends and Winter Time or normal time begins.
        In Europe, the normal Central European Time (CET) applies again instead of the Central European Summer Time (CEST) or Daylight Saving Time (DST).

        At 3am the clock will be set to 2am.

        But why it adds 2 hour more in my case is strange. Seems to be an edge case.

        When you add a call on the 27.10.2024 at 3.05 am to 4.05 am it calculates a duration if 1h and 55 minutes. Seem the DST calculation / Time shift is based on the hour, but technically the time change already occured at 3.05am so the duration should be 55 Minutes.

        Comment


        • item
          item commented
          Editing a comment
          Haaa thanks all...
          Understand now
      • ThomasB
        Senior Member
        • Mar 2022
        • 163

        #7
        Ah, great. Thanks, yuri.

        Comment

        Working...