# RTL DateTime.ToString() bug?

**URL:** https://talk.remobjects.com/t/rtl-datetime-tostring-bug/22226
**Category:** C#
**Created:** [June 6, 2020, 3:00pm UTC](https://talk.remobjects.com/t/rtl-datetime-tostring-bug/22226 "2020-06-06T15:00:47Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![garry.pettet](https://talk.remobjects.com/user_avatar/talk.remobjects.com/garry.pettet/32/12917_2.png) [@garry.pettet](https://talk.remobjects.com/u/garry.pettet)
#### Post date: [June 6, 2020, 3:00pm UTC](https://talk.remobjects.com/t/rtl-datetime-tostring-bug/22226/1 "2020-06-06T15:00:47Z")

</div>

I’m sure I’m doing something wrong here but I have this C# code (using Elements RTL on Island macOS console app):

```auto
namespace TestApp
{
    static class Program
    {
        public static Int32 Main(string[] args)
        {
            string timestamp = DateTime.UtcNow.ToString();
            Console.WriteLine("Timestamp: " + timestamp);
            return 0;
        }
    }
}

```

The console outputs: `Timestamp: `

It would seem that the `ToString()` method on the `DateTime `object returned by `UtcNow `is empty.

---

<div class="post-metadata">

### Author: ![mh](https://talk.remobjects.com/user_avatar/talk.remobjects.com/mh/32/18050_2.png) [@mh](https://talk.remobjects.com/u/mh)
#### Post date: [June 6, 2020, 3:07pm UTC](https://talk.remobjects.com/t/rtl-datetime-tostring-bug/22226/2 "2020-06-06T15:07:07Z")

</div>

Hmm. ill have a look, that is strange. reproduced though.

---

<div class="post-metadata">

### Author: ![mh](https://talk.remobjects.com/user_avatar/talk.remobjects.com/mh/32/18050_2.png) [@mh](https://talk.remobjects.com/u/mh)
#### Post date: [June 6, 2020, 3:19pm UTC](https://talk.remobjects.com/t/rtl-datetime-tostring-bug/22226/3 "2020-06-06T15:19:50Z")

</div>

Partially fixed, though it will always use the default format and timezone, as fully implementing the overloads needs more work than _I_ can do today.

---

<div class="post-metadata">

### Author: ![mh](https://talk.remobjects.com/user_avatar/talk.remobjects.com/mh/32/18050_2.png) [@mh](https://talk.remobjects.com/u/mh)
#### Post date: [June 6, 2020, 7:14pm UTC](https://talk.remobjects.com/t/rtl-datetime-tostring-bug/22226/4 "2020-06-06T19:14:03Z")

</div>

if you don’t want to wait for a new build, you can grab the code at [https://github.com/remobjects/rtl2](https://github.com/remobjects/rtl2) and build it yourself.
