axuno / SmartFormat

A lightweight text templating library written in C# which can be a drop-in replacement for string.Format
Other
1.1k stars 105 forks source link

DateTime -> Different Timezone possible #111

Closed jogibear9988 closed 5 years ago

jogibear9988 commented 6 years ago

In my Backend I store every DateTime as UTC, but I use SmartFormat for sending Messages to my customer. Is it possible to change the TimeZone of the DateTime via SmartFormat?

axunonb commented 6 years ago

Hi Jochen, that's a good point. The TimeFormatter works with the DateTime structure, so it's not aware of time zones. So we could think about a setting for the formatter to either work with DateTime or DateTimeOffset. It would be great if you posted a PR for that.

axunonb commented 5 years ago

Should be resolved with Release 2.4.0.0