Consider Using DateTimeOffset Instead of DateTime
See original GitHub issueI’ve been going over my code and have been moving over my “ticks” or “candles” to Trady.Core.Candle
. However, I just noticed that the “tick” is a DateTime
rather than a DateTimeOffset
. From my understanding, DateTimeOffset
s are preferred as they contain timezones and save a lot of additional work (in theory?).
Anyways, I was wondering what the feeling is on updating the ITick.DateTime
field to be a DateTimeOffset
instead.
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
DateTime vs DateTimeOffset
DateTimeOffset expands on this by being able to store local times from anywhere in the world. It also stores the offset between that...
Read more >Converting between DateTime and DateTimeOffset
DateTimeOffset reflects a time's offset from UTC, but it doesn't reflect the actual time zone to which that offset belongs. For more information ......
Read more >DateTimeOffset vs DateTime - What's the difference?
The DateTimeOffset structure represents a date and time value, together with an offset that indicates how much that value differs from UTC. Thus ......
Read more >C# - DateTimeOffset versus DateTime, why use offsets?
DateTime and DatimeTimeOffset are very much alike. They both consist of a date and a time, however a DateTimeOffset also has an offset,...
Read more >DateTimeOffset vs DateTime - Which One To Use? (C# .NET)
In this video, I will show you the difference between DateTime and DateTimeOffset (C# .NET) and what you should consider when using them....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@Mike-EEE I have just released a beta-version on this issue, just let you know 😄
@Mike-EEE Sorry for the late response. You’ve made a good argument on using
DateTimeOffset
rather than usingDateTime
.To be honest, I didn’t think of it when I initially created this library, I was focusing on implementing indicators & the rule system. This library is now heavily rely on
DateTime
, but I agree that it should be a change to work around with the timezone problem. The only problem is there may be a large code change from it 🤣