Hankintailmoitukset / hilma-api

11 stars 0 forks source link

Date/Time sent in UTC is not adjusted to Finnish time zone in HILMA's UI #220

Open jlouvrier opened 2 months ago

jlouvrier commented 2 months ago

See: https://www.hankintailmoitukset.fi/fi/public/procedure/7193/enotice/9391/lot/LOT-0000

Screenshot 2024-05-23 at 18 12 02

Dates sent by us in UTC in XML:

2021-04-28+00:00 2028-06-29+00:00 Updated (27.5.2024) Full XML communicated to Jake by email on Friday.
solita-reddy commented 2 months ago

Hey Julien, I've opened a ticket for this internally and we will continue to investigate. I noticed that the XML you sent is mal-formatted and I'm having troubles viewing it, would you kindly email me a copy of the XML to jake.reddy@solita.fi.

jlouvrier commented 2 months ago

@solita-reddy Hi Jake! I shared the xml by email on Friday. Have you had the chance to look into it? More customers have spotted the issue now, we need to give them some explanation. Thank you!

solita-reddy commented 2 months ago

@jlouvrier Sorry for the delay. I'm a little confused on the issue you are reporting, the date you are sending is being displayed correctly. If you wish for the date to be displayed in EEST you would need to handle it internally and send that format to us.

jlouvrier commented 1 month ago

@solita-reddy

I tried to remove the time from one of our XML and it does not pass HILMA's validation. Please consider the regex for BT-537 for example.

Sending this, note that I removed the time after the date

2024-06-19 2024-08-30 **Getting following validation error** \n 'Duration end date' (BT-537-Lot) must match the following pattern: Date\n This is in line with what I tried to explain earlier today in the API meeting: time is expected.
solita-reddy commented 1 month ago

The section of the XML you are referencing does not have a time, it is only date.

      <cac:PlannedPeriod>
        <cbc:StartDate>2021-04-28+00:00</cbc:StartDate>
        <cbc:EndDate>2028-06-29+00:00</cbc:EndDate>
      </cac:PlannedPeriod>

The '+00:00' is a reference to the time zone, +00:00 is UTC +03:00 is EEST.

you can find more information on XML date formats here: https://www.w3schools.com/xml/schema_dtypes_date.asp

If including a StartTime and EndTime into the PlannedPeriod is something you require we can discus adding in a future feature release.

jlouvrier commented 1 month ago

Yes, you're right, my bad. I'll consider whether we need to change our approach. I'll get back to you.

jlouvrier commented 1 month ago

@solita-reddy We do not have such a request. Hansel users do not understand why the date displayed in HILMA does not correspond to the date they chose in Mercell. You could convert our date to EEST or indicate that the date is UTC and it would solve the problem.

solita-reddy commented 1 month ago

Hey Julian, I don't think converting the date is a possibility. We can display the time zone next to the date, yes. Petteri will schedule us a teams meeting regarding this issue.

MaxKholoshnyi commented 1 month ago

The section of the XML you are referencing does not have a time, it is only date.

      <cac:PlannedPeriod>
        <cbc:StartDate>2021-04-28+00:00</cbc:StartDate>
        <cbc:EndDate>2028-06-29+00:00</cbc:EndDate>
      </cac:PlannedPeriod>

The '+00:00' is a reference to the time zone, +00:00 is UTC +03:00 is EEST.

you can find more information on XML date formats here: https://www.w3schools.com/xml/schema_dtypes_date.asp

If including a StartTime and EndTime into the PlannedPeriod is something you require we can discus adding in a future feature release.

Do I understand correctly that we shall send the date with "Z" instead of time zone?

2021-04-28Z 2028-06-29Z
solita-reddy commented 1 month ago

Yes that is correct, using either 'Z' or '+00:00' will send the date it UTC time zone.

solita-reddy commented 2 weeks ago

If there is nothing else needed could you go ahead and close the ticket :)