Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#308 closed defect (fixed)

League.Calendars.Ada_Conversions is incorrect

Reported by: ivan.levashev Owned by:
Priority: major Milestone: 0.5.1
Component: Matreshka - League Version: 0.5.0
Keywords: Calendars Date Time Zone Cc:


I have recently run into situation where current method of date/time conversion doesn't work. AWS creates date/time out of HTTP date in a wrong way. Ada has special APIs for time-zone conversions including UTC, but AWS instead creates date/time as if it were a local date/time. As result, I've got an Ada date/time value that can't be accepted by Matreshka conversion because Seconds / 3600 = 24 > 23

Response header Date: Fri, 07 Jun 2013 23:36:43 GMT
Seconds = 85003.00000000

I think, a better option for Matreshka is to use Ada.Calendar.Formatting APIs for conversions. They explicitly have a time-zone argument that defaults to 0, and they have distinct hour/minute/secons/subsecond/leapness arguments.

Change History (6)

comment:1 by ivan.levashev, 8 years ago

85003 < 86400, but Seconds / 3600 = 24. This is strange, but that's what I see.

comment:2 by vadim.godunko, 8 years ago

In 3957:

Fix conversion error for times near to the end of day.

Refs #308.

comment:3 by vadim.godunko, 8 years ago

In 3958:

Add automated test.

Refs #308.

comment:4 by vadim.godunko, 8 years ago

Milestone: 0.6.0
Resolution: fixed
Status: newclosed

comment:5 by vadim.godunko, 8 years ago

In 4098:

Merge changes into 0.5.x branch.

Refs #308.

comment:6 by vadim.godunko, 8 years ago

Note: See TracTickets for help on using tickets.