TheGeneGenieProject / GeneGenie.Gedcom

A .Net library for loading, saving, working with and analysing family trees stored in the GEDCOM format.
GNU Affero General Public License v3.0
52 stars 22 forks source link

ChangeDate: Wrong culture and time in output #82

Closed OkapiD closed 4 years ago

OkapiD commented 4 years ago

Automatically created ChangeDate has German culture in Output:

1 CHAN 2 DATE 01 Mai 2020 3 TIME 06:36:35

The time should be pm in that case.

Maybe that way:

1 CHAN 2 DATE 01 May 2020 3 TIME 18:36:35

OkapiD commented 4 years ago

At some place in library

            ChangeDate.Date1 = now.ToString("dd MMM yyyy");
            ChangeDate.Time = now.ToString("hh:mm:ss");

should be maybe

            ChangeDate.Date1 = now.ToString("dd MMM yyyy", CultureInfo.InvariantCulture);
            ChangeDate.Time = now.ToString("HH:mm:ss", CultureInfo.InvariantCulture);
RyanONeill1970 commented 4 years ago

Thanks for that, now corrected with unit tests.