Skip to content

Incorrect timestamp serialization on non-english locales #170

Closed

Description

@snechaev

Environment: Win10 with non-english locale. The decimal delmeter is comma (,)

Code snippet

            var client = new SlackTaskClient(token);
            var loginResult = await client.ConnectAsync();
            var chanell = client.Groups.First(x => x.name == "<private channel name here>");
            var startDate = DateTime.Now.Date - (new TimeSpan(1, 0, 0, 0));
            var endDate = DateTime.Now.Date;

            var history = await client.GetGroupHistoryAsync(chanell, endDate, startDate); //System.OverflowException

In last line I got System.OverflowException inside Json parser.

In the sniffer I see the following request parameters (note decimal delimiter)

latest=1552323600,000000
oldest=1552237200,000000

End the response (also note delimiter)
{"ok":true,"latest":"1552323600,000000","oldest":"1552237200,000000","messages":[],"has_more":false}

If I replace delimiter in the request with the period (.), all works fine.

Activity

  1. added a commit that references this issue on Mar 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions