paiden / Nett

.Net library for TOML
MIT License
223 stars 27 forks source link

Date/time misformatting #66

Closed jgriffitts closed 5 years ago

jgriffitts commented 5 years ago

This latest update corrupts date/time entries in my tables. Example program:

using System;
using System.Collections.Generic;
using Nett;

namespace ConsoleApp_TOML
{
    class Program
    {
        static void Main(string[] args)
        {
            /* Look for NETT bug with date/time formatting */
            string test_data = @"ActiveSince = 2018-12-26 22:31:33.109707-07:00";
            var test_tbl = Nett.Toml.ReadString(test_data);
            Console.WriteLine(Toml.WriteString(test_tbl));
        }
    }
}

When I run this, I get the result:

ActiveSince = 2018-12-2622:31:33.109707-07:00

The space between date and time has been lost, and the date is not parseable any more.

jgriffitts commented 5 years ago

There's something funny about the release version. I cloned the repository and built it locally, and the problem went away. Then I deleted the reference to my local dll and reinstalled it with NuGet, and the problem reappeared.

paiden commented 5 years ago

That issue was already fixed on master with 4aba35d8 but is not yet published on NuGet. I hope to publish a new release within the next few days.

paiden commented 5 years ago

Fixed with 0.10.1 release